Skip to content

fix(generate): use fully-qualified docker.io image in generated Dockerfiles#2847

Open
mikeland73 wants to merge 1 commit into
mainfrom
claude/focused-goldberg-ifmSK
Open

fix(generate): use fully-qualified docker.io image in generated Dockerfiles#2847
mikeland73 wants to merge 1 commit into
mainfrom
claude/focused-goldberg-ifmSK

Conversation

@mikeland73
Copy link
Copy Markdown
Collaborator

Summary

Fixes #2520.

The Dockerfiles produced by devbox generate dockerfile and devbox generate devcontainer referenced the base image with an unqualified name:

FROM jetpackio/devbox:latest
# and, for --root-user:
FROM jetpackio/devbox-root-user:latest

Docker itself implicitly expands unqualified names to Docker Hub (docker.io/), but other OCI runtimes do not. Podman, Buildah, and containerd/nerdctl either fail to resolve an unqualified reference or prompt the user to pick a registry (depending on registries.conf). As the issue requests, the generated Dockerfile should use the fully-qualified image path so it builds consistently regardless of runtime.

Changes

Qualify the base image with the explicit docker.io/ registry in both generated-Dockerfile templates:

File Before After
internal/devbox/generate/tmpl/dev.Dockerfile.tmpl jetpackio/devbox:latest / jetpackio/devbox-root-user:latest docker.io/jetpackio/devbox:latest / docker.io/jetpackio/devbox-root-user:latest
internal/devbox/generate/tmpl/prod.Dockerfile.tmpl jetpackio/devbox:latest docker.io/jetpackio/devbox:latest

The namespace is unchanged — these images are published to Docker Hub under jetpackio/devbox and jetpackio/devbox-root-user (see .github/workflows/docker-image-release.yml), so docker.io/ is the correct prefix.

How was it tested?

  • go build ./internal/devbox/generate/ — clean.
  • Rendered both templates (dev and prod, with RootUser true/false) and confirmed every FROM line now uses the docker.io/ prefix.
  • The existing generate testscripts (testscripts/generate/dockerfile.test.txt, devcontainer.test.txt) only assert that the files are produced, so behavior is unaffected.

cc @codegod100 (issue reporter)


Generated by Claude Code

…rfiles

The Dockerfiles produced by 'devbox generate dockerfile' and
'devbox generate devcontainer' referenced the base image as an
unqualified 'jetpackio/devbox:latest'. Container runtimes other than
Docker (e.g. Podman, containerd/nerdctl, Buildah) do not implicitly
default unqualified image names to Docker Hub, so the generated
Dockerfile would fail to resolve the base image (or prompt for a
registry) on those runtimes.

Qualify the base image with the explicit 'docker.io/' registry so the
generated Dockerfiles build consistently across runtimes. The images
are published to Docker Hub under jetpackio/devbox[-root-user], so the
prefix is correct.

Fixes #2520
Copilot AI review requested due to automatic review settings June 4, 2026 14:09
Copy link
Copy Markdown
Contributor

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 fixes inconsistent image resolution across OCI runtimes by updating the Dockerfile templates generated by devbox generate dockerfile and devbox generate devcontainer to use a fully-qualified Docker Hub reference (docker.io/...) for the Devbox base images.

Changes:

  • Updated the prod Dockerfile template to use FROM docker.io/jetpackio/devbox:latest.
  • Updated the dev/devcontainer Dockerfile template (including the --root-user branch) to use FROM docker.io/jetpackio/devbox(-root-user):latest.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/devbox/generate/tmpl/prod.Dockerfile.tmpl Qualifies the prod generated Dockerfile base image with docker.io/ for OCI-runtime compatibility.
internal/devbox/generate/tmpl/dev.Dockerfile.tmpl Qualifies the dev/devcontainer generated Dockerfile base images (root/non-root variants) with docker.io/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mikeland73 mikeland73 requested review from loreto and mohsenari June 6, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

devcontainer generate image path

3 participants