Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile template to match best practices #6021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rhcarvalho
Copy link
Contributor

@rhcarvalho rhcarvalho commented Dec 20, 2024

Changes:

  • Remove -y flag from apt-get update, as it has no effect on that command.
  • Use --no-install-recommends flag to avoid installing unnecessary dependencies.
  • Use more general wildcard to remove apt package list cache.
  • Remove apt-get clean command, as official Debian and Ubuntu images run it automatically.
  • Update example in the documentation to match the changes.

Reference:

Changes:

- Remove `-y` flag from `apt-get update`, as it
  has no effect on that command.
- Use `--no-install-recommends` flag to avoid
  installing unnecessary dependencies.
- Use more general wildcard to remove apt package
  list cache.
- Remove `apt-get clean` command, as official
  Debian and Ubuntu images run it automatically.
- Update example in the documentation to match
  the changes.

Reference:

- https://docs.docker.com/build/building/best-practices/#apt-get
@rhcarvalho

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants