Skip to content

Patch to origin/commit-change patch to add docker import support#9101

Closed
rhatdan wants to merge 7 commits intomoby:masterfrom
rhatdan:origin/commit-change
Closed

Patch to origin/commit-change patch to add docker import support#9101
rhatdan wants to merge 7 commits intomoby:masterfrom
rhatdan:origin/commit-change

Conversation

@rhatdan
Copy link
Copy Markdown
Contributor

@rhatdan rhatdan commented Nov 11, 2014

pass --change changes to the import job

Docker-DCO-1.1-Signed-off-by: Dan Walsh <[email protected]> (github: rhatdan)

I have added a patch to #8765

Which implements docker import --change.

dqminh and others added 7 commits November 11, 2014 16:20
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)
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <[email protected]> (github: dqminh)
Docker-DCO-1.1-Signed-off-by: Dan Walsh <[email protected]> (github: rhatdan)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change this text - its confusing me

something more like
Run a Dockerfile instruction before commiting the image

another thing that i'm curious about - does the instruction run in the container, and so will persist if i docker start it again, or is the container commited, then a new one made based on that image, and the instruciton run in that temporary container..

we should probably mention which ever that is in the docs too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about
-c, --change=[] Apply Dockerfile instruction to the created image.
Since the user does not care about whether this happens before or after the image.

@SvenDowideit
Copy link
Copy Markdown
Contributor

I think a little more detail about side-effects (or lack thereof) is needed - @fredlf @jamtur01

@rhatdan
Copy link
Copy Markdown
Contributor Author

rhatdan commented Nov 12, 2014

@SvenDowideit Not exactly sure what you mean?

This command will update the created images json file with the same type of data that can be specified in the Dockerfile. This content will be used within the image unless an layered image replaces some of the data. Since the data is in the image, all containers that run using this image will have the Dockerfile instructions.

@rhatdan
Copy link
Copy Markdown
Contributor Author

rhatdan commented Nov 12, 2014

Replace pull request with #9123

@rhatdan rhatdan closed this Nov 12, 2014
@fredlf
Copy link
Copy Markdown
Contributor

fredlf commented Nov 13, 2014

I think @rhatdan's comment above is the model for the doc. Something like:

-c, --change=[] update the created image's JSON file with the same type of data specified in its Dockerfile. This data will be used within the image unless a layered image replaces some of it. Since the image contains the data, all containers run using this image will include the Dockerfile instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants