Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker image output field to support publish to repository when using BuildKit (Cherry-pick of #20154) #20185

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

WorkerPants
Copy link
Member

Currently, the publish goal doesn't work with docker images when buildkit is enabled, as by default buildkit doesn't save the build output locally, and publish expects that the images were saved.

This PR adds support for setting the output type, and defaults it todocker, which is the legacy docker build behavior, i.e. saves to the local image store.

However, we only want to set that when buildkit is enabled. I thought it better to add an explicit option for that at the subsystem level; this allows for validation of buildkit-only options.

This eliminates the need to set DOCKER_BUILDKIT=1 in env vars - I need to update the docs on that actually.

I have validated that with this change, docker images can be published to a registry.

…sing BuildKit (#20154)

Currently, the `publish` goal doesn't work with docker images when
buildkit is enabled, as by [default buildkit doesn't save the build
output locally](docker/buildx#166), and
`publish` expects that the images were saved.

This PR adds support for setting the output type, and defaults it
to`docker`, which is the legacy docker build behavior, i.e. saves to the
local image store.

However, we only want to set that when buildkit is enabled. I thought it
better to add an explicit option for that at the subsystem level; this
allows for validation of buildkit-only options.

This eliminates the need to set `DOCKER_BUILDKIT=1` in env vars - I need
to update the docs on that actually.

I have validated that with this change, docker images can be published
to a registry.

---------

Co-authored-by: Rhys Madigan <rhys.madigan@accenture.com>
@kaos kaos merged commit 8bdf5a8 into 2.19.x Nov 15, 2023
24 checks passed
@kaos kaos deleted the cherry-pick-20154-to-2.19.x branch November 15, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants