Skip to content

Conversation

@kota2and3kan
Copy link
Contributor

Description

This PR adds the --no-install-recommends option in arguments of the apt-get command in the Dockerfile.

It seems that, now, using the --no-install-recommends option is recommended in the Building best practices of Docker. It can avoid installing unnecessary packages when we run the apt-get command.

Please take a look!

Related issues and/or PRs

N/A

Changes made

  • Add the --no-install-recommends option in each Dockerfile.

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@kota2and3kan kota2and3kan requested a review from Copilot June 9, 2025 06:56
@kota2and3kan kota2and3kan self-assigned this Jun 9, 2025
Copy link

Copilot AI left a 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-recommends option has no effect when used with apt-get upgrade (it only applies to install). Consider whether this option is necessary here or if it should instead be applied to any apt-get install commands.
RUN apt-get update && apt-get upgrade -y --no-install-recommends \

client/Dockerfile:3

  • [nitpick] The --no-install-recommends option has no effect when used with apt-get upgrade. Verify whether this flag is needed here or if it should be applied to apt-get install operations instead.
RUN apt-get update && apt-get upgrade -y --no-install-recommends \

@kota2and3kan kota2and3kan requested review from feeblefakie and jnmt June 9, 2025 07:10
Copy link
Collaborator

@jnmt jnmt left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants