Skip to content

Instantly share code, notes, and snippets.

@chbrandt
Created July 14, 2020 09:42
Show Gist options
  • Save chbrandt/994fc3fb6053a115afc29db084ba1f4c to your computer and use it in GitHub Desktop.
Save chbrandt/994fc3fb6053a115afc29db084ba1f4c to your computer and use it in GitHub Desktop.
RUN APT non-interactively, clean APT cache (for instance, on Docker/Dockerfile)
# At least in the good old days, declaring apt "frontend" as `noninteractive` used to be necessary,
# I don't know if that still applies, but I keep doing it anyways...doesn't hurt.
# Same thing for `apt-get clean`, not necessary anymore but I keep it there.
# (https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get)
RUN DEBIAN_FRONTEND='noninteractive' && \
apt-get update && \
apt-get install -y vim && \
apt-get clean && rm -rf /var/lib/apt/lists/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment