Skip to content

Commit

Permalink
Merge pull request #2476 from tarlepp/chore(env)/speed-up-build-process
Browse files Browse the repository at this point in the history
Chore(env) - Make build process a bit faster
  • Loading branch information
tarlepp committed Oct 28, 2023
2 parents 8bf3264 + 4aa3219 commit 13bbf05
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions Dockerfile_dev
Expand Up @@ -83,17 +83,6 @@ RUN composer completion bash > /etc/bash_completion.d/composer
COPY ./docker/php/php-dev.ini /usr/local/etc/php/php.ini
COPY ./docker/php/www-dev.conf /usr/local/etc/php-fpm.d/www.conf

# Define used work directory
WORKDIR /app

# Add everything inside docker image
COPY . .

# Ensure that all required files has execute rights
RUN chmod +x /app/bin/console \
&& chmod +x /app/docker-entrypoint-dev.sh \
&& chmod +x /usr/bin/composer

RUN chmod -R o+s+w /usr/local/etc/php

RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest | \
Expand All @@ -106,14 +95,12 @@ RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/relea

RUN groupadd --gid ${HOST_GID} dev \
&& useradd \
-p $(perl \
-e 'print crypt($ARGV[0], "password")' 'dev') \
-p $(perl -e 'print crypt($ARGV[0], "password")' 'dev') \
--uid ${HOST_UID} \
--gid ${HOST_GID} \
--shell /bin/bash \
--create-home dev \
&& usermod -a -G www-data,sudo dev \
&& chgrp -hR dev /app \
&& echo 'dev ALL=(ALL) ALL' >> /etc/sudoers

RUN mkdir -p /home/dev/.config/fish/completions \
Expand All @@ -123,6 +110,17 @@ RUN mkdir -p /home/dev/.config/fish/completions \
&& mkdir -p /home/dev/.nvm \
&& chmod 777 -R /home/dev

# Define used work directory
WORKDIR /app

# Add everything inside docker image
COPY --chown=dev:dev . .

# Ensure that all required files has execute rights
RUN chmod +x /app/bin/console \
&& chmod +x /app/docker-entrypoint-dev.sh \
&& chmod +x /usr/bin/composer

USER dev

RUN pip3 install thefuck --user --break-system-packages
Expand Down

0 comments on commit 13bbf05

Please sign in to comment.