@@ -83,17 +83,6 @@ RUN composer completion bash > /etc/bash_completion.d/composer
8383COPY ./docker/php/php-dev.ini /usr/local/etc/php/php.ini
8484COPY ./docker/php/www-dev.conf /usr/local/etc/php-fpm.d/www.conf
8585
86- # Define used work directory
87- WORKDIR /app
88-
89- # Add everything inside docker image
90- COPY . .
91-
92- # Ensure that all required files has execute rights
93- RUN chmod +x /app/bin/console \
94- && chmod +x /app/docker-entrypoint-dev.sh \
95- && chmod +x /usr/bin/composer
96-
9786RUN chmod -R o+s+w /usr/local/etc/php
9887
9988RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest | \
@@ -106,14 +95,12 @@ RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/relea
10695
10796RUN groupadd --gid ${HOST_GID} dev \
10897 && useradd \
109- -p $(perl \
110- -e 'print crypt($ARGV[0], "password")' 'dev') \
98+ -p $(perl -e 'print crypt($ARGV[0], "password")' 'dev') \
11199 --uid ${HOST_UID} \
112100 --gid ${HOST_GID} \
113101 --shell /bin/bash \
114102 --create-home dev \
115103 && usermod -a -G www-data,sudo dev \
116- && chgrp -hR dev /app \
117104 && echo 'dev ALL=(ALL) ALL' >> /etc/sudoers
118105
119106RUN mkdir -p /home/dev/.config/fish/completions \
@@ -123,6 +110,17 @@ RUN mkdir -p /home/dev/.config/fish/completions \
123110 && mkdir -p /home/dev/.nvm \
124111 && chmod 777 -R /home/dev
125112
113+ # Define used work directory
114+ WORKDIR /app
115+
116+ # Add everything inside docker image
117+ COPY --chown=dev:dev . .
118+
119+ # Ensure that all required files has execute rights
120+ RUN chmod +x /app/bin/console \
121+ && chmod +x /app/docker-entrypoint-dev.sh \
122+ && chmod +x /usr/bin/composer
123+
126124USER dev
127125
128126RUN pip3 install thefuck --user --break-system-packages
0 commit comments