-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Container Build: multiple registry push, single archive for multiple tags, tar.gz file writing. #32132
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
base: main
Are you sure you want to change the base?
Conversation
@baronfel The PR is at this point still in a draft state to discuss the general design of the different features. Will add the final implementations and all the unit/integration tests once I have the approval that the general approach and extensions are fine like this 😁 |
|
<ItemGroup>
<!-- Multiple Tags on company artifactory (name team-my-app in the my-docker-repo folder) -->
<ContainerImageTags Include="artifactory.my-company.com/my-docker-repo/team-my-app:latest" />
<ContainerImageTags Include="artifactory.my-company.com/my-docker-repo/team-my-app:v1.0.1" />
<ContainerImageTags Include="artifactory.my-company.com/my-docker-repo/team-my-app:v1.0" />
<ContainerImageTags Include="artifactory.my-company.com/my-docker-repo/team-my-app:v1" />
<!-- Only latest and main release version on docker hub (name my-app under my-username) ->
<ContainerImageTags Include="registry.hub.docker.com/my-username/my-app:latest" />
<ContainerImageTags Include="registry.hub.docker.com/my-username/my-app:v1" />
<!-- Only latest on Azure Container Registry (only my-app, no folder) ->
<ContainerImageTags Include="myregistry.azurecr.io/my-app:latest" />
<!-- Proposal: Local daemon push with latest -->
<ContainerImageTags Include="local-daemon/my-app:latest" />
<!-- Proposal: Local tar.gz writing via file URLs? -->
<ContainerImageTags Include="file:///C:/containers/my-app.tar.gz:latest" />
<ContainerImageTags Include="file:///C:/containers/my-app.tar.gz:v1" />
</ItemGroup> @baronfel What do you think about this proposal? |
Hi folks, very sorry for the delay getting back to this - it's been a very packed July. I very much think that we should keep these features separate. I agree that there is some similarity between the use cases, but I would rather make sure that individual pushes (to any location) are as solid and well-thought-out as they can be before we get into the world of trying to create a unified interface for multiple-destination publishing. I do agree that @Danielku15's con of I do really like the insight that different fully-qualified tags should be able to be provided by the user - that is a natural progression of our existing In summary, I'd rather focus on individual publishes being precise and semantically solid (i.e. introducing new flags/properties/etc for publishing to local daemons vs remote registries vs exporting to a local tar.gz), and then as a separate design discussions tackle
As an aside, one thing I worry about with multiple pushes is how the current environment-variable-based username/password last-chance mechanism would work with multiple registries - we'd need to redesign that mechanism for a world with multiple registries I believe. |
This PR relates to following issues:
The issues somehow closely relate to the workflow around registries so I decided to rather tackle them all together. The PR has the following adaptions:
OutputRegistry
is converted to an arrayOutputRegistries
to support pushing to multiple registries with following syntax:RepoTags
key (for local tar.gz and daemon load)Open Design Decisions:
Shall we better use an explicit string for the local daemon load? Empty strings are often filtered or ignored. Having something more explicit might be better.
Proposal: Use a string like
local-container-daemon
as registry to triggerdocker load
flow.On all registries the image will be named the same. Maybe the image should be named differently on different registries due to naming policies (public vs internal).
Proposal: Use the URL fragment syntax to define a different name:
Taken Design Decisions:
Pros:
- We keep the configuration syntax simple for now. The feature can still be added with a special syntax or an additional configuration file.
Cons:
- Multiple publish commands will result in different layer hashes for the app due to non-deterministic gzip compression and timestamp differences.
Ping @baronfel for further discussion here.