Skip to content

devenv: Add Ubuntu 24.04 based devenv image#144

Merged
cgwalters merged 3 commits intobootc-dev:mainfrom
henrywang:ubuntu
Mar 17, 2026
Merged

devenv: Add Ubuntu 24.04 based devenv image#144
cgwalters merged 3 commits intobootc-dev:mainfrom
henrywang:ubuntu

Conversation

@henrywang
Copy link
Copy Markdown
Contributor

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)

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 Ubuntu 24.04 Devenv Image: A new development environment image based on Ubuntu 24.04 has been added, providing a more stable alternative to the existing Debian sid image.
  • Advanced Package Management: The Ubuntu image leverages a multi-stage build process, cherry-picking newer container stack components (podman, crun, skopeo, just) from Ubuntu 25.04 (plucky) and implementing architecture-aware mirror selection for multi-arch builds.
  • Build Automation: A new devenv-build-ubuntu target has been introduced in the Justfile to simplify the building of the new Ubuntu development environment image.
  • User and Environment Setup: The Ubuntu image is configured with essential development tools, Rust, Kani formal verification, and a dedicated devenv user with appropriate permissions and volume mounts for container storage.

🧠 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
  • Justfile
    • Added a new devenv-build-ubuntu target for building the Ubuntu 24.04 development environment image.
  • devenv/Containerfile.ubuntu
    • Created a new Dockerfile defining the Ubuntu 24.04 based development environment.
    • Configured base system setup, including apt sandboxing disablement, repository additions (universe, plucky, github-cli), and architecture-aware mirror selection.
    • Integrated multi-stage builds for tools (uv), Rust, and Kani formal verification.
    • Installed common and Ubuntu-specific packages, npm packages, and tmt via uv.
    • Set up environment variables for Rustup and Kani.
    • Added devenv-init.sh, userns-setup, and devenv-selftest.sh scripts.
    • Created a devenv user with sudo privileges and configured container storage volumes.
  • devenv/build-deps-ubuntu.txt
    • Added ostree as a build dependency for the Ubuntu image.
  • devenv/packages-ubuntu.txt
    • Listed Ubuntu-specific packages required for the development environment, including clang-format, libkrb5-dev, libvirt-dev, libostree-dev, python3-dev, genisoimage, qemu-utils, libvirt-daemon-system, fsverity, and vim.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/build-devcontainer.yml
    • .github/workflows/test-devcontainer.yml
Activity
  • No human activity has been recorded on this pull request yet.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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

  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

@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 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

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?

Comment on lines +83 to +90
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/
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

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>
@henrywang henrywang force-pushed the ubuntu branch 2 times, most recently from da13979 to 0e8db42 Compare March 17, 2026 13:51
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>
@henrywang
Copy link
Copy Markdown
Contributor Author

For debian Test DevContainer failure, test still uses old image, the update in this PR not included. The same test for ubuntu passed. They use same test script.

@cgwalters cgwalters enabled auto-merge (squash) March 17, 2026 14:32
fi
echo "deb ${mirror} plucky universe main" > /etc/apt/sources.list.d/plucky.list

# Enable gh CLI repository
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.

I think we should share this one with the other images too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Debian and C10S have gh CLI repo added.

"golang.Go"
]
},
"devaipod": {
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.

Also here we may need to go to generating these or at least validating they're in sync

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
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.

We've gone from 2 to 3 copies of this stuff...which is a baseline rule I have where deduplication is probably wanted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in my later PR.

@cgwalters cgwalters merged commit 56e4f61 into bootc-dev:main Mar 17, 2026
12 of 13 checks passed
@henrywang henrywang deleted the ubuntu branch March 17, 2026 16:05
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