@@ -82,17 +82,6 @@ RUN composer completion bash > /etc/bash_completion.d/composer
8282# restart containers and you're good
8383COPY ./docker/php/php-dev.ini /usr/local/etc/php/php.ini
8484
85- # Define used work directory
86- WORKDIR /app
87-
88- # Add everything inside docker image
89- COPY . .
90-
91- # Ensure that all required files has execute rights
92- RUN chmod +x /app/bin/console \
93- && chmod +x /app/docker-entrypoint-dev.sh \
94- && chmod +x /usr/bin/composer
95-
9685RUN chmod -R o+s+w /usr/local/etc/php
9786
9887# Enable PHP-FPM status page
@@ -108,14 +97,12 @@ RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/relea
10897
10998RUN groupadd --gid ${HOST_GID} dev \
11099 && useradd \
111- -p $(perl \
112- -e 'print crypt($ARGV[0], "password")' 'dev') \
100+ -p $(perl -e 'print crypt($ARGV[0], "password")' 'dev') \
113101 --uid ${HOST_UID} \
114102 --gid ${HOST_GID} \
115103 --shell /bin/bash \
116104 --create-home dev \
117105 && usermod -a -G www-data,sudo dev \
118- && chgrp -hR dev /app \
119106 && echo 'dev ALL=(ALL) ALL' >> /etc/sudoers
120107
121108RUN mkdir -p /home/dev/.config/fish/completions \
@@ -125,6 +112,17 @@ RUN mkdir -p /home/dev/.config/fish/completions \
125112 && mkdir -p /home/dev/.nvm \
126113 && chmod 777 -R /home/dev
127114
115+ # Define used work directory
116+ WORKDIR /app
117+
118+ # Add everything inside docker image
119+ COPY --chown=dev:dev . .
120+
121+ # Ensure that all required files has execute rights
122+ RUN chmod +x /app/bin/console \
123+ && chmod +x /app/docker-entrypoint-dev.sh \
124+ && chmod +x /usr/bin/composer
125+
128126USER dev
129127
130128RUN pip3 install thefuck --user --break-system-packages
0 commit comments