Skip to content

Commit

Permalink
Review comment: add autoclean/autoremove
Browse files Browse the repository at this point in the history
It's not really needed in this case, but does not harm either, and can
be useful if somebody copy-pastes it to container having more complex
deps, or one using image based on non-stable distro.

Signed-off-by: Eero Tamminen <[email protected]>
  • Loading branch information
eero-t committed Jan 9, 2025
1 parent 91ddd61 commit e48e03d
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 @@ -17,7 +17,9 @@ RUN useradd -m -s /bin/bash user && \

# get security updates
RUN apt-get update && apt-get upgrade -y && \
apt-get clean && rm -rf /var/lib/apt/lists/*
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

WORKDIR $HOME

Expand Down

0 comments on commit e48e03d

Please sign in to comment.