Properly clean up apt footprint in Dockerfile

According to the official best practices guidelines outlined in the following document: https://docs.docker.com/develop/develop-images/instructions/#apt-get

The official Debian/Ubuntu images have been configured to do `apt-get` clean automatically. Consequently, performing `apt clean` is unnecessary. As no package has been removed, another `apt autoremove` is also unnecessary. Instead, it'll be helpful to clear the cache for the index file by executing this command: `rm -rf /var/lib/apt/lists/*`.
This commit is contained in:
Peter Dave Hello 2024-06-18 01:27:45 +08:00 committed by GitHub
parent 2221743cc8
commit cc7fcd503d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,6 @@
FROM python:3.11-slim-bookworm
LABEL maintainer="@jay_townsend1 & @NotoriousRebel1"
RUN apt update && apt install -y pipx git; apt clean; apt autoremove -y
RUN apt update && apt install -y pipx git && rm -rf /var/lib/apt/lists/*
RUN pipx install git+https://github.com/laramies/theHarvester.git
RUN pipx ensurepath
ENTRYPOINT ["/root/.local/bin/restfulHarvest", "-H", "0.0.0.0", "-p", "80"]