-
Notifications
You must be signed in to change notification settings - Fork 3
Add --no-install-recommends option in args of apt-get #171
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
Add --no-install-recommends option in args of apt-get #171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the --no-install-recommends flag to the apt-get upgrade commands in two Dockerfiles to align with Docker’s recommended best practices for minimizing installed packages.
- Updates
ledger/Dockerfile - Updates
client/Dockerfile
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ledger/Dockerfile | Added --no-install-recommends to the apt-get upgrade invocation. |
| client/Dockerfile | Added --no-install-recommends to the apt-get upgrade invocation. |
Comments suppressed due to low confidence (2)
ledger/Dockerfile:13
- [nitpick] The
--no-install-recommendsoption has no effect when used withapt-get upgrade(it only applies toinstall). Consider whether this option is necessary here or if it should instead be applied to anyapt-get installcommands.
RUN apt-get update && apt-get upgrade -y --no-install-recommends \
client/Dockerfile:3
- [nitpick] The
--no-install-recommendsoption has no effect when used withapt-get upgrade. Verify whether this flag is needed here or if it should be applied toapt-get installoperations instead.
RUN apt-get update && apt-get upgrade -y --no-install-recommends \
jnmt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
feeblefakie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Description
This PR adds the
--no-install-recommendsoption in arguments of theapt-getcommand in the Dockerfile.It seems that, now, using the
--no-install-recommendsoption is recommended in the Building best practices of Docker. It can avoid installing unnecessary packages when we run theapt-getcommand.apt-getcommand. You can see the details of the--no-install-recommendsoption.--no-install-recommendsoption is added in Docker documentation.Please take a look!
Related issues and/or PRs
N/A
Changes made
--no-install-recommendsoption in each Dockerfile.Checklist
Additional notes (optional)
N/A
Release notes
N/A