-
Notifications
You must be signed in to change notification settings - Fork 608
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
support overriding image CMD on commit #552
Conversation
ccc4179
to
2db428e
Compare
Thanks, but please sign the commit for DCO (run |
cmd/nerdctl/commit.go
Outdated
@@ -39,6 +39,7 @@ func newCommitCommand() *cobra.Command { | |||
} | |||
commitCommand.Flags().StringP("author", "a", "", `Author (e.g., "nerdctl contributor <[email protected]>")`) | |||
commitCommand.Flags().StringP("message", "m", "", "Commit message") | |||
commitCommand.Flags().StringSlice("override-cmd", nil, "Override image CMD") |
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.
This should be like --change='CMD ["apachectl", "-DFOREGROUND"]'
https://docs.docker.com/engine/reference/commandline/commit/
c094fe6
to
a2cdf40
Compare
Please squash commits ( |
cmd/nerdctl/commit.go
Outdated
@@ -39,6 +41,7 @@ func newCommitCommand() *cobra.Command { | |||
} | |||
commitCommand.Flags().StringP("author", "a", "", `Author (e.g., "nerdctl contributor <[email protected]>")`) | |||
commitCommand.Flags().StringP("message", "m", "", "Commit message") | |||
commitCommand.Flags().StringSliceP("change", "c", nil, "Apply Dockerfile instruction to the created image") |
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.
The help string should describe that only CMD
instruction is supported currently.
a2cdf40
to
88b5ee6
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
Support supplying a CMD to override when committing an image Signed-off-by: Tom Feigin <[email protected]>
88b5ee6
to
91b95a7
Compare
Adding docs in #572 |
This PR adds support for supplying a CMD to override when committing an image