-
Notifications
You must be signed in to change notification settings - Fork 9
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
mkctr: add flag to save image/images to disk #25
base: main
Are you sure you want to change the base?
Conversation
mkctr.go
Outdated
@@ -96,6 +98,7 @@ func main() { | |||
ldflagsArg = flag.String("ldflags", "", "the --ldflags value to pass to go") | |||
gotags = flag.String("gotags", "", "the --tags value to pass to go") | |||
push = flag.Bool("push", false, "publish the image") | |||
outPath = flag.String("out-path", "", "write single images to a tarball, or multi-platform images to a folder") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need the single file path option? Can't we have a single --dst
flag that takes a directory arg and writes either one or many files to that directory depending on whether it's a multi-arch or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like that would simplify the UX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
This commit adds a new flag, --out-path which will allow the user to write the image to disk; if building a single image, e.g. with --target local, a tar is created at the out-path. if building a multi arch image, then a directorty is created with the images and oci manifest. Signed-off-by: Kristoffer Dalby <[email protected]>
975889b
to
db82727
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Kristoffer, this looks good to me!
As an optional improvement, might also validate that both --push=true
and --out
flags are not passed at the same time.
But happy for this to go in either way
This commit adds a new flag, --out-path which will allow the user to write the image to disk;
if building a single image, e.g. with --target local, a tar is created at the out-path.
if building a multi arch image, then a directorty is
created with the images and oci manifest.