Add support for 'commit --change'#8332
Conversation
|
This looks perfect to me, although I would like to see the same changes applied to docker import. Adding this to import would allow people building base images to properly annotate them. @crosbymichael @shykes @tianon Can we get thumbs up or thumbs down on this pull request. It does match the previous suggested syntax and allows us a way forward with some of my other pull requests and allows me to resubmit the META patch. |
|
@rhatdan yes, i would like to see |
|
@dqminh Could you rebase this patch set to allow it to merge. |
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <[email protected]> (github: dqminh)
Instead of building the actual image, `build_config` will serialize a subset of dockerfile ast into *runconfig.Config Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <[email protected]> (github: dqminh)
In addition to config env, `commit` now will also accepts a `changes` env which is a string contains new-line separated Dockerfile instructions. `commit` will evaluate `changes` into `runconfig.Config` and merge it with `config` env, and then finally commit a new image with the changed config Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <[email protected]> (github: dqminh)
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <[email protected]> (github: dqminh)
b78e3c6 to
e2a4052
Compare
|
@rhatdan I rebased the patch. I think this will need docs too, i will do it once the design is approved. |
|
@crosbymichael Does this look like what you guys want? If we are going to close down my pull request for setting environment variables in docker import, I need a way forward. |
|
Acceptance of this patch is holding up at least two of our patches, from even being submitted? Can we get approval of the design? @crosbymichael @tianon @shykes @creack Someone from docker????? |
|
Reviewing |
|
For things that are not supported I think the user should get a hard error. I tried this and it worked. docker commit --change 'FROM other' 7334db741b97
bb501d8c9d8257c2a703a718c8f1a25bb2a1ecb847dc2997bfb114aa906d58ea |
|
I agree, FROM, RUN, ADD should all be blocked. But if the CLI is fine, we could move forward. |
Perhaps an implementation detail, but probably better to whitelist accepted instructions in stead of blacklist, e.g. |
|
I opened a pr for the whitelist and return of the error. |
|
Link? |
The spec for
commit --changecan be found at #5105This PR changes the original pull request to use new builder for generating
runconfig.ConfigSupported Dockerfile instructions for
--changeare:Example command: