Skip to content

chores(docker): add apt options --no-install-{recommandes,suggests}#405

Open
mgrzybek wants to merge 8 commits into
mainfrom
apt
Open

chores(docker): add apt options --no-install-{recommandes,suggests}#405
mgrzybek wants to merge 8 commits into
mainfrom
apt

Conversation

@mgrzybek

@mgrzybek mgrzybek commented May 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mgrzybek
mgrzybek requested a review from a team as a code owner May 7, 2026 09:51

@amanning9 amanning9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(now added as review below)

@amanning9 amanning9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're here, I think it's worth using a cache mount instead of rm -rf /var/lib/apt/lists/*?

eg:

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked
--mount=type=cache,target=/var/lib/apt,sharing=locked
apt update && apt-get --no-install-recommends --no-install-suggests install -y gcc

  • and also remove the line which delete's the apt-cache.

This means there different build stages will share the apt-cache.

Docs: https://docs.docker.com/build/cache/optimize/#use-cache-mounts

Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
mgrzybek and others added 7 commits July 16, 2026 15:20
Signed-off-by: Mathieu Grzybek <mathieu@stackhpc.com>
`wget` needs `ca-certificates`.
Co-authored-by: Alex Manning <alexm@stackhpc.com>
Co-authored-by: Alex Manning <alexm@stackhpc.com>
Co-authored-by: Alex Manning <alexm@stackhpc.com>
Co-authored-by: Alex Manning <alexm@stackhpc.com>
Co-authored-by: Alex Manning <alexm@stackhpc.com>
Co-authored-by: Alex Manning <alexm@stackhpc.com>
@mgrzybek
mgrzybek requested a review from amanning9 July 16, 2026 13:21
@mgrzybek

Copy link
Copy Markdown
Contributor Author

I applied all your suggested changes. That makes sense.

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