Skip to content

Commit ea52469

Browse files
committed
Chore(env) - Make build process a bit faster
1 parent 169d16a commit ea52469

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

Dockerfile_dev

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,6 @@ RUN composer completion bash > /etc/bash_completion.d/composer
8282
# restart containers and you're good
8383
COPY ./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-
9685
RUN 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

10998
RUN 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

121108
RUN 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+
128126
USER dev
129127

130128
RUN pip3 install thefuck --user --break-system-packages

0 commit comments

Comments
 (0)