.github/workflows, images/ubuntu: Add image definition for Ubuntu 25.10#1801
.github/workflows, images/ubuntu: Add image definition for Ubuntu 25.10#1801Ferenc- wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a Containerfile and an extra-packages list to build a toolbox container image for Ubuntu 25.10. The review feedback focuses on improving the robustness of the build process, specifically recommending the use of rm -f instead of rm to avoid failures if files are missing, using the standard rm -rf for cleaning up apt lists, and appending || true to the userdel command to handle cases where the user does not exist.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| # 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 |
There was a problem hiding this comment.
Using rm without the -f (force) flag can cause the build to fail if the target files do not exist (e.g., if they are removed or renamed in a future revision of the base image). It is safer and more robust to use rm -f.
RUN rm -f /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-languages
| RUN apt-get update && \ | ||
| DEBIAN_FRONTEND=noninteractive apt-get -y install unminimize && \ | ||
| sed -Ei '/apt-get (update|upgrade)/s/^/#/' /usr/bin/unminimize && \ | ||
| yes | /usr/bin/unminimize && \ | ||
| DEBIAN_FRONTEND=noninteractive apt-get -y install \ | ||
| ubuntu-minimal ubuntu-standard \ | ||
| libnss-myhostname \ | ||
| flatpak-xdg-utils \ | ||
| $(cat extra-packages | xargs) && \ | ||
| rm -rd /var/lib/apt/lists/* |
There was a problem hiding this comment.
Using rm -rd is non-standard for cleaning up /var/lib/apt/lists/*. Using rm -rf is the standard, robust, and idiomatic way to clean up apt lists in Dockerfiles.
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install unminimize && \
sed -Ei '/apt-get (update|upgrade)/s/^/#/' /usr/bin/unminimize && \
yes | /usr/bin/unminimize && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
ubuntu-minimal ubuntu-standard \
libnss-myhostname \
flatpak-xdg-utils \
$(cat extra-packages | xargs) && \
rm -rf /var/lib/apt/lists/*
| flatpak-xdg-utils \ | ||
| $(cat extra-packages | xargs) && \ | ||
| rm -rd /var/lib/apt/lists/* | ||
| RUN rm /extra-packages |
|
|
||
| # 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 |
There was a problem hiding this comment.
| 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 |
containers#1801 Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com>
|
recheck |
|
recheck |
containers#1801 Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com>
|
Rebased against |
Add Ubuntu 25.10 image.