devenv: Add Ubuntu 24.04 based devenv image#144
Conversation
Summary of ChangesHello, 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 introduces a new development environment image built on Ubuntu 24.04, aiming to offer a more stable and reliable alternative to the existing Debian sid image which has experienced transient package issues. The new image incorporates a robust multi-stage build process, leveraging newer package versions from Ubuntu 25.04 for critical container tools and ensuring multi-architecture compatibility. This enhancement provides developers with an updated and more resilient environment for their work. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new development environment based on Ubuntu 24.04, which is a great addition for stability. The implementation is well-structured and consistent with the existing Debian and CentOS images. I have two suggestions for the new Containerfile.ubuntu: one is to address a potential build failure due to a future-dated Rust nightly version, and the other is a small refactoring to improve clarity by simplifying how binaries are copied into the final image.
|
|
||
| FROM base AS rust | ||
| # renovate: datasource=custom.rust-nightly depName=rust-nightly versioning=rust-release-channel | ||
| ARG rust_nightly=nightly-2026-03-08 |
There was a problem hiding this comment.
The default value for rust_nightly is set to a future date (nightly-2026-03-08). This will likely cause the build to fail when install-rust.sh tries to install this non-existent nightly toolchain via rustup. While this pattern is copied from other Containerfiles, it seems problematic. Could you confirm if this is intentional or a placeholder that should be updated to a valid, recent nightly version?
| COPY --from=tools /usr/local/bin/uv /usr/local/bin/uv | ||
| COPY --from=tools /usr/local/bin/uvx /usr/local/bin/uvx | ||
| ENV UV_TOOL_DIR=/usr/local/uv-tools | ||
| ENV UV_TOOL_BIN_DIR=/usr/local/bin | ||
| RUN uv tool install 'tmt[provision-virtual]' | ||
|
|
||
| # Copy in the binaries from our tools container image | ||
| COPY --from=tools /usr/local/bin/* /usr/local/bin/ |
There was a problem hiding this comment.
The uv and uvx binaries are copied from the tools stage, then used, and then all binaries from the tools stage (including uv and uvx again) are copied over. This can be simplified by copying all binaries from the tools stage at once before using uv, which removes redundant COPY instructions.
COPY --from=tools /usr/local/bin/* /usr/local/bin/
ENV UV_TOOL_DIR=/usr/local/uv-tools
ENV UV_TOOL_BIN_DIR=/usr/local/bin
RUN uv tool install 'tmt[provision-virtual]'
Add a new Containerfile.ubuntu based on ubuntu:24.04, reusing the same approach as actions/bootc-ubuntu-setup: cherry-pick newer podman, crun, skopeo, and just from plucky (Ubuntu 25.04) with arch-aware mirror selection for multi-arch builds. This provides a more stable alternative to the Debian sid image which suffers from transient package breakage. The Debian image remains the default devcontainer for now; the Ubuntu image can be rolled out as default once validated. Assisted-by: Claude Code (Opus 4.6) Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
In nested containers the /dev/kvm device node can exist without being usable. Use read+write access checks instead of existence to avoid false positives that cause the bcvk VM test to fail in CI. Assisted-by: Claude Code (Opus 4.6) Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
da13979 to
0e8db42
Compare
Add devcontainer-ubuntu.json pointing to the ubuntu devenv image. Update the devcontainer-test recipe to select the OS-specific config so each variant is tested with its own image. Without this, the test recipe always used the debian devcontainer config, causing the devcontainer CLI to pull the remote debian image instead of the locally built ubuntu image. Assisted-by: Claude Code (Opus 4.6) Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
|
For debian |
| fi | ||
| echo "deb ${mirror} plucky universe main" > /etc/apt/sources.list.d/plucky.list | ||
|
|
||
| # Enable gh CLI repository |
There was a problem hiding this comment.
I think we should share this one with the other images too
There was a problem hiding this comment.
Debian and C10S have gh CLI repo added.
| "golang.Go" | ||
| ] | ||
| }, | ||
| "devaipod": { |
There was a problem hiding this comment.
Also here we may need to go to generating these or at least validating they're in sync
There was a problem hiding this comment.
Done in my later PR.
| COPY install-rust.sh /run/src/ | ||
| RUN rust_nightly=$rust_nightly /run/src/install-rust.sh | ||
|
|
||
| # Kani formal verification tool - requires rustup for toolchain management |
There was a problem hiding this comment.
We've gone from 2 to 3 copies of this stuff...which is a baseline rule I have where deduplication is probably wanted.
There was a problem hiding this comment.
Done in my later PR.
Add a new Containerfile.ubuntu based on ubuntu:24.04, reusing the same approach as actions/bootc-ubuntu-setup: cherry-pick newer podman, crun, skopeo, and just from plucky (Ubuntu 25.04) with arch-aware mirror selection for multi-arch builds.
This provides a more stable alternative to the Debian sid image which suffers from transient package breakage. The Debian image remains the default devcontainer for now; the Ubuntu image can be rolled out as default once validated.
Assisted-by: Claude Code (Opus 4.6)