Closed hassenius closed 2 years ago
Thanks for your work on this @hassenius ❤️ , I think all of this makes sense. Running without the Daemon has been something desired for quite some time.
@jpreese how do you feel about the separate copy
command, and the new switches "force", "override-arch", "override-os", "all-variants"
?
@jpreese how do you feel about the separate
copy
command, and the new switches"force", "override-arch", "override-os", "all-variants"
?
How would copy differ from sync?
You mean to name the command sync
instead of copy
?
Yeah, instead of introducing a new command, just have the current sync command use your work.
It just wasn't clear to me if you're also proposing behavioral differences.
Not sure which sync command you refer to @jpreese ?
Available Commands:
check Check for newer images
completion Generate the autocompletion script for the specified shell
create Create a new a manifest
help Help about any command
list List the images found in the manifest
pull Pull the images in the manifest
push Push the images in the manifest to the target repository
update Update an existing manifest
version The version of sinker
I think the new command is quite fundamentally different from from the pull/push implementations, since it doesn't use the image store managed by the docker daemon, so I think it makes sense to keep it separate from the current push/pull commands.
I agree that the mechanics differ quite a bit between the current commands and the only you're proposing, but the semantics feel the same. That is, whatever is defined in manifest.yaml
gets added to the remote registry. The need to pull down the image to the daemon and then push is just a technical limitation of the current implementation.
You're deeper into the woods than I am on this, so if you feel they are different enough to warrant more commands and it fits your flow better--I am for it. Just wanted to make sure we've considered everything.
So, this is leveraging what's implemented in https://github.com/containers/image/blob/main/copy/copy.go, and the code is mainly just setting up what's needed for that. I think the main difference being that the focus on the implementation in copy.go is to ensure an identical copy, including manifest digests, in pull/push it's not. That's a subtle difference that can be a breaking change for some folks.
I wouldn't be too keen on pulling apart the implementation in copy.go to fit it into existing pull/push commands, but I guess it would be possible to replace the existing pull/push with just this implementation as push (probably removing pull since it doesn't make much sense anymore).
I think from the intended usage pattern of sinker this would be fine, but it could be breaking if anyone does anything outside that, like for example pull, modify, push (i.e. add labels/annotations, whatever) -- which I think technically would be supported with the current implementation?
Anything further needed from me @jpreese ?
Shouldn't be, @hassenius! I'm at KubeCon EU at the moment so activity is spotty. But I will take a look at the PR as soon as I can ❤️
Shouldn't be, @hassenius! I'm at KubeCon EU at the moment so activity is spotty. But I will take a look at the PR as soon as I can ❤️
Me too, we should meet for a coffee
Shouldn't be, @hassenius! I'm at KubeCon EU at the moment so activity is spotty. But I will take a look at the PR as soon as I can ❤️
Me too, we should meet for a coffee
Spoke at KubeCon -- this is already being used in production, so has been battle tested. Code itself looks OK to me. Will do a couple cleanups in a followup PR.
This proposal adds support for github.com/containers/image/v5 (addesses #47) which enables copying of images from source to target without requiring access to docker socket.
This is necessary for us to enable use of sinker in a containerised pipeline without docker-in-docker enabled.
I also started an outline of how to address #62 via boolean
--all-variants
and--override-os
/--override-arch
It currently works (without docker running on a mac)
I would like as a next step add the option to direct this, as a cleaner part of command line and image manifest.
For example could be something like
Or something like that..
Please let me know your thoughts, and I'll should be able to wrap it up quite quickly...