Skip to content

refactor(get): pull build images with the split moby client - #480

Merged
thde merged 1 commit into
mainfrom
thde/moby
Oct 15, 2026
Merged

thde merged 1 commit into
mainfrom
thde/moby

Conversation

@thde

@thde thde commented Oct 15, 2026

Copy link
Copy Markdown
Member

Replace the github.com/docker/docker SDK with the standalone github.com/moby/moby/client and github.com/moby/moby/api modules for nctl get build --pull-image. This drops the docker/docker and moby/moby +incompatible modules and replaces the mix of docker/docker and moby/moby imports in build.go with the two split modules.

  • Create the client with client.New(client.FromEnv). API version negotiation is now the default.
  • Encode registry auth with authconfig.Encode.
  • Render pull progress with jsonmessage.DisplayMessages over the response's message iterator, which handles terminal detection and closing the stream.
  • Adapt ImageTag calls to the new ImageTagOptions API.

Behaviour is unchanged: the image is still pulled through the local Docker daemon and tagged as :latest and :.

govulncheck alerts

Replace the github.com/docker/docker SDK with the standalone
github.com/moby/moby/client and github.com/moby/moby/api modules for
`nctl get build --pull-image`. This drops the docker/docker and
moby/moby +incompatible modules and replaces the mix of docker/docker
and moby/moby imports in build.go with the two split modules.

- Create the client with client.New(client.FromEnv).
  API version negotiation is now the default.
- Encode registry auth with authconfig.Encode.
- Render pull progress with jsonmessage.DisplayMessages over the
  response's message iterator, which handles terminal detection and
  closing the stream.
- Adapt ImageTag calls to the new ImageTagOptions API.

Behaviour is unchanged: the image is still pulled through the local
Docker daemon and tagged as :latest and :<build-name>.

@SaadAssaf SaadAssaf left a comment

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.

looks good

@thde
thde merged commit 3fabff2 into main Oct 15, 2026
3 checks passed
@thde
thde deleted the thde/moby branch October 15, 2026 14:07
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.

2 participants