Skip to content

Commit

Permalink
build(Dockerfile): clean up working dir when building
Browse files Browse the repository at this point in the history
  • Loading branch information
AlcidesRC committed Aug 24, 2024
1 parent 5819464 commit 4f30df5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ RUN addgroup --gid ${HOST_GROUP_ID} ${HOST_GROUP_NAME} \
&& adduser --shell /bin/bash --uid ${HOST_USER_ID} --ingroup ${HOST_GROUP_NAME} --ingroup www-data --disabled-password --gecos '' ${HOST_USER_NAME}

# Ensure working dir is writtable by current user
RUN chown -Rf ${HOST_USER_NAME}:${HOST_GROUP_NAME} /var/www/html
RUN chown -Rf ${HOST_USER_NAME}:${HOST_GROUP_NAME} /var/www/html \
&& find /var/www/html -type f -delete \
&& rm -Rf /var/www/html/*

# Add __ONLY__ compiled extensions & their config files
COPY --from=extensions-builder-dev /usr/local/lib/php/extensions/*/* /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
Expand Down

0 comments on commit 4f30df5

Please sign in to comment.