dont use the package manager for node and composer
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
2023-03-16 11:20:40 +01:00
parent 205fecb6f1
commit 047180bcae

View File

@@ -2,13 +2,28 @@ FROM ubuntu:latest
ARG USERNAME=laravel
ARG USER_UID=1000
ARG NODE_VERSION='' # node version number like "12.22.1" or empty for the latest version
ARG COMPOSER_VERSION='' # composer version number like "2.1" or empty for the latest version
COPY start-container /usr/local/bin/start-container
RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y update \
&& apt-get install -y php php-xml php-curl php-xml php-mbstring composer npm \
&& apt-get install -y curl php php-xml php-curl php-xml php-mbstring \
&& useradd --create-home --uid=$USER_UID $USERNAME \
&& chmod +x /usr/local/bin/start-container
&& echo "install nvm and node"
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
&& $HOME/.nvm/nvm.sh
&& if [ -z "$NODE_VERSION" ]; then NODE_VERSION="node"
&& nvm install $NODE_VERSION
&& echo "install composer"
&& curl -o composer-setup.php https://getcomposer.org/installer
&& curl -o composer-setup.sig https://composer.github.io/installer.sig
&& echo " composer-setup.php" >> composer-setup.sig
&& sha384sum -c composer-setup.sig
&& if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"
&& php composer-setup.php $COMPOSER_VERSION
&& rm composer-setup.php composer-setup.sig
EXPOSE 8080