combine all run commands

This commit is contained in:
Ruben Momoa
2024-08-20 15:10:49 +02:00
parent 6f648c4ebd
commit 40ad625556

View File

@@ -16,20 +16,20 @@ ENV NVM_DIR="/home/$USERNAME/.nvm"
COPY start-container.sh /usr/local/bin/start-container
RUN apt-get -y update
RUN apt-get install -y curl git 7zip php php-xml php-curl php-xml php-mbstring php-mysql php-gd
RUN apt-get clean
RUN useradd --create-home --uid=${USER_UID} ${USERNAME}
RUN chmod +x /usr/local/bin/start-container
RUN echo "install composer"
RUN curl -o composer-setup.php https://getcomposer.org/installer
RUN curl -o composer-setup.sig https://composer.github.io/installer.sig
RUN echo " composer-setup.php" >> composer-setup.sig
RUN sha384sum -c composer-setup.sig
RUN if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"; fi
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer $COMPOSER_VERSION
RUN rm composer-setup.php composer-setup.sig /var/www/html/*
RUN chown $USERNAME:$USERNAME /var/www/html
RUN apt-get -y update; \
apt-get install -y curl git 7zip php php-xml php-curl php-xml php-mbstring php-mysql php-gd; \
apt-get clean; \
useradd --create-home --uid=${USER_UID} ${USERNAME}; \
chmod +x /usr/local/bin/start-container; \
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}"; fi; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer $COMPOSER_VERSION; \
rm composer-setup.php composer-setup.sig /var/www/html/*; \
chown $USERNAME:$USERNAME /var/www/html; \
EXPOSE 8080