Skip to content

images: add ubuntu/26.04#1798

Open
Ferenc- wants to merge 1 commit into
containers:mainfrom
Ferenc-:ubuntu-26.04
Open

images: add ubuntu/26.04#1798
Ferenc- wants to merge 1 commit into
containers:mainfrom
Ferenc-:ubuntu-26.04

Conversation

@Ferenc-
Copy link
Copy Markdown

@Ferenc- Ferenc- commented May 28, 2026

Add Ubuntu 26.04 image.

@Ferenc- Ferenc- requested a review from Jmennius as a code owner May 28, 2026 11:28
Copy link
Copy Markdown

@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 introduces a new Containerfile and an extra-packages list to build an Ubuntu 26.04 base image for Toolbox containers. The review feedback highlights several opportunities to improve build robustness, such as correcting a typo in the metadata labels, using the -f flag with rm to prevent build failures if targeted files are missing, and safely deleting the ubuntu user only if it exists.

Comment thread images/ubuntu/26.04/Containerfile

# Remove apt configuration optimized for containers
# Remove docker-gzip-indexes to help with "command-not-found"
RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-languages
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using rm without the -f (force) flag can cause the build to fail if these configuration files are missing or renamed in future versions of the base image. Using rm -f ensures the build is more robust.

RUN rm -f /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-languages


# Having anything in /home prevents toolbox from symlinking /var/home there,
# and 'ubuntu' user with UID 1000 will most likely conflict with host user as well
RUN userdel --remove ubuntu
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If the ubuntu user does not exist in the base image (or is removed in a future upstream update), userdel will fail with a non-zero exit code, causing the image build to fail. It is safer to check if the user exists before attempting to delete it, or ignore the failure.

RUN id -u ubuntu &>/dev/null && userdel --remove ubuntu || true

RUN userdel --remove ubuntu

# Disable APT ESM hook which tries to enable some systemd services on each apt invocation
RUN rm /etc/apt/apt.conf.d/20apt-esm-hook.conf
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using rm without the -f flag will cause the build to fail if the ESM hook file is not present. Using rm -f is safer and more robust against changes in the base image.

RUN rm -f /etc/apt/apt.conf.d/20apt-esm-hook.conf

Copy link
Copy Markdown
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding the image definition for Ubuntu 26.04! I took a quick look at it, and it seems sane to me. I will wait a bit to hear from @Jmennius because he is our Ubuntu maintainer before merging it.

Meanwhile, I left some comments below; and could you please add the URL of this pull request to the commit message, and tweak it to something like this to match the format we use elsewhere:

.github/workflows, images/ubuntu: Add image definition for Ubuntu 26.04

Comment thread .github/workflows/ubuntu-images.yaml Outdated
Comment thread .github/workflows/ubuntu-images.yaml Outdated
@Ferenc-
Copy link
Copy Markdown
Author

Ferenc- commented May 29, 2026

Thanks a lot for adding the image definition for Ubuntu 26.04! I took a quick look at it, and it seems sane to me. I will wait a bit to hear from @Jmennius because he is our Ubuntu maintainer before merging it.

Meanwhile, I left some comments below; and could you please add the URL of this pull request to the commit message, and tweak it to something like this to match the format we use elsewhere:

.github/workflows, images/ubuntu: Add image definition for Ubuntu 26.04

Thanks for the feedback, I have done the changes. PTAL.

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