Skip to content

Commit

Permalink
Dockerfile: clean /code directory
Browse files Browse the repository at this point in the history
The /code directory in the image
is 38M because it contains .git,
.docker, and various other
configuration files.

Clean out the directory completely
to make the image slightly smaller.
  • Loading branch information
pjonsson authored and omad committed Nov 15, 2023
1 parent ccf1f3a commit f385352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ WORKDIR $APPDIR
# want to delete the stuff in the /code folder to keep it simple.
RUN if [ "$ENVIRONMENT" = "deployment" ] ; then\
pip install .[$ENVIRONMENT]; \
rm -rf /code/* ; \
rm -rf /code/* /code/.??* ; \
else \
pip install --editable .[$ENVIRONMENT]; \
fi
Expand Down

0 comments on commit f385352

Please sign in to comment.