From 5e046d1d24667d1b4b77aaf322897e78f6451a09 Mon Sep 17 00:00:00 2001 From: SuperDev Date: Mon, 19 Dec 2022 12:06:46 -0600 Subject: [PATCH] Update dockerfile --- dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dockerfile b/dockerfile index 6f22a4d..c733e53 100644 --- a/dockerfile +++ b/dockerfile @@ -4,6 +4,14 @@ RUN docker-php-ext-install pdo_mysql RUN apt-get update +# 6. User + +ARG uid +RUN useradd -G www-data,root -u 911 -d /home/devuser devuser +RUN mkdir -p /home/devuser/.composer && \ + chown -R devuser:devuser /home/devuser && \ + chown -R devuser /home/devuser/.composer/ + # 1. development packages RUN apt-get install -y \ git \ @@ -47,12 +55,4 @@ RUN docker-php-ext-install \ # 5. composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer -# 6. User - -ARG uid -RUN useradd -G www-data,root -u $uid -d /home/devuser devuser -RUN mkdir -p /home/devuser/.composer && \ - chown -R devuser:devuser /home/devuser && \ - chown -R devuser /home/devuser/.composer/ - CMD ["apache2ctl", "-D", "FOREGROUND"]