-
Notifications
You must be signed in to change notification settings - Fork 792
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
commit: add a --add-file flag #5226
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0e7204b
to
8611bdc
Compare
LGTM |
It's something we're going to use for https://issues.redhat.com/browse/RUN-1838. It's really only exposed at the CLI so that we can have an integration test as part of this PR. For |
Read the contents of the file `source` and add it to the committed image as a file at `destination`. The new file will | ||
be owned by UID 0, GID 0, have 0644 permissions, and be given a current timestamp unless the **--timestamp** option is | ||
also specified. This option can be specified multiple times. | ||
|
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.
Not necessary for this PR, but did you consider making the destination optional? I.e., if not specified, it would default to the source location?
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.
It hadn't occurred to me, but there's no reason it couldn't be optional.
Add a flag to `buildah commit` which allows adding arbitrary files to the image while we're committing it. When not squashing, they'll take the form of a second new layer. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
8611bdc
to
041388f
Compare
LGTM |
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add a flag to
buildah commit
which allows adding arbitrary files to the image while we're committing it. When not squashing, they'll take the form of a second new layer.How to verify it
New integration test!
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
The bit that warns about not being able to do this in combination with
--cw
should be easy to fix once #5224 or something like it is merged.Does this PR introduce a user-facing change?