Skip to content

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Apr 23, 2025

This sets ubuntu as default base for the buildkit image. This will allow us to setup CDI within the container for NVIDIA devices that require glibc for client librairies.

Last commits publish both alpine and ubuntu variants using the following format:

  • moby/buildkit:<tag>: ubuntu root
  • moby/buildkit:<tag>-ubuntu: ubuntu root
  • moby/buildkit:<tag>-ubuntu-nvidia: ubuntu root with nvidia contrib tag
  • moby/buildkit:<tag>-rootless: ubuntu rootless
  • moby/buildkit:<tag>-rootless-ubuntu: ubuntu rootless
  • moby/buildkit:<tag>-alpine: alpine root
  • moby/buildkit:<tag>-rootless-alpine: alpine rootless

@github-actions github-actions bot added area/hack building buildkit itself area/ci labels Apr 23, 2025
@crazy-max crazy-max self-assigned this Apr 24, 2025
@thompson-shaun thompson-shaun requested a review from Copilot April 24, 2025 15:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR switches the default base image for Buildkit to Debian and differentiates between Debian and Alpine variants.

  • Updated the workflow matrix to include a new "base" key with values for Debian (empty string) and Alpine.
  • Adjusted environment variable configurations accordingly to use the new matrix keys.
Files not reviewed (3)
  • Dockerfile: Language not supported
  • docker-bake.hcl: Language not supported
  • hack/images: Language not supported
Comments suppressed due to low confidence (2)

.github/workflows/buildkit.yml:191

  • [nitpick] The matrix key 'base' may not clearly indicate that an empty string represents Debian. Consider using a more descriptive name such as 'imageBase' to clarify intent.
+        base:

.github/workflows/buildkit.yml:192

  • [nitpick] It might be helpful to add a comment explaining that an empty string for 'base' indicates the default Debian image, improving maintainability.
+          - ''

@crazy-max crazy-max changed the title use debian base for buildkit image use ubuntu base for buildkit image May 16, 2025
@crazy-max crazy-max force-pushed the debian-base branch 2 times, most recently from 5d94f62 to 80285f9 Compare July 10, 2025 11:38
@crazy-max
Copy link
Member Author

crazy-max commented Jul 11, 2025

Ubuntu rootless doesn't build with uid 1000 as it already exists. Wonder if we should change it for both Alpine and Ubuntu to be consistent 🤔

https://github.com/moby/buildkit/actions/runs/16194070978/job/45717191384?pr=5944#step:7:1930

 > [linux/amd64 rootless-ubuntu 3/3] RUN adduser --disabled-password --gecos "" --uid 1000 user   && mkdir -p /run/user/1000 /home/user/.local/tmp /home/user/.local/share/buildkit   && chown -R user /run/user/1000 /home/user   && echo user:100000:65536 | tee /etc/subuid | tee /etc/subgid:
1.126 fatal: The UID 1000 is already in use.

Edit: Skipped user creation and use one already created from base image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/hack building buildkit itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant