Skip to content

simple base apt install#5387

Merged
zbb88888 merged 8 commits intokubeovn:release-1.12-mcfrom
zbb88888:simple-base
Jun 24, 2025
Merged

simple base apt install#5387
zbb88888 merged 8 commits intokubeovn:release-1.12-mcfrom
zbb88888:simple-base

Conversation

@zbb88888
Copy link
Copy Markdown
Collaborator

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 23, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @zbb88888, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request aims to simplify the base Docker image by streamlining its package dependencies. The primary change involves removing a suite of strongSwan-related packages, which reduces the image's footprint and narrows its scope, while also adding a couple of general-purpose utilities for improved functionality.

Highlights

  • Dependency Reduction: Removed a significant number of strongSwan (IPsec/VPN) related packages (e.g., strongswan, strongswan-pki, libcharon-extra-plugins, etc.) from the dist/images/Dockerfile.base, simplifying the base image's dependency footprint.
  • Utility Additions: Included j2cli (Jinja2 CLI) and lsof (list open files) utilities in the dist/images/Dockerfile.base for enhanced templating and debugging capabilities within the base image.
  • Dockerfile Optimization: Made a minor adjustment to the apt install command in dist/images/Dockerfile.base by reordering the -y flag for consistency, ensuring it appears before --no-install-recommends.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the package list in the base Dockerfile. It removes strongswan and its related packages, and adds j2cli and lsof.

I've left a comment with suggestions to sort the package list for maintainability and to add apt-get clean to reduce the final image size.

Additionally, the pull request description is currently empty. It would be very helpful to add details about why these package changes are being made, especially the removal of strongswan and the addition of j2cli. This context is crucial for reviewers and for future reference.

Comment thread dist/images/Dockerfile.base Outdated
Comment on lines +163 to +167
ca-certificates python3 hostname libunwind8 netbase \
ethtool iproute2 ncat libunbound8 procps libatomic1 kmod iptables python3-netifaces python3-sortedcontainers \
tcpdump ipvsadm ipset curl uuid-runtime openssl inetutils-ping arping ndisc6 conntrack traceroute iputils-tracepath \
logrotate dnsutils net-tools strongswan strongswan-pki libcharon-extra-plugins libmnl0 \
libcharon-extauth-plugins libstrongswan-extra-plugins libstrongswan-standard-plugins -y --no-install-recommends && \
logrotate dnsutils net-tools libmnl0 \
j2cli lsof && \
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.

medium

I have a couple of suggestions to improve this RUN instruction:

  1. Sort packages: For better maintainability and to make it easier to find packages in this list, please consider sorting them alphabetically. This also helps in preventing duplicate package entries.
  2. Clean apt cache: To further reduce the image size, it's a good practice to clean the apt cache which stores the downloaded package files (.deb). You can do this by adding apt-get clean to the command chain before cleaning up the apt lists.

I've combined both suggestions in the code below.

        arping ca-certificates conntrack curl dnsutils ethtool hostname \
        inetutils-ping iproute2 ipset iptables iputils-tracepath ipvsadm j2cli \
        kmod libatomic1 libmnl0 libunbound8 libunwind8 logrotate lsof \
        ncat ndisc6 net-tools netbase openssl procps python3 \
        python3-netifaces python3-sortedcontainers tcpdump traceroute uuid-runtime && apt-get clean && \

zbb88888 added 3 commits June 23, 2025 17:21
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 24, 2025
zbb88888 added 3 commits June 24, 2025 10:11
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
Signed-off-by: zbb88888 <jmdxjsjgcxy@gmail.com>
@zbb88888 zbb88888 merged commit 6d1c9c8 into kubeovn:release-1.12-mc Jun 24, 2025
40 checks passed
@zbb88888 zbb88888 deleted the simple-base branch June 24, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants