Repository navigation
Update doc: "docker create" must specify a command - #11210
Conversation
|
Can you please sign your commits following these rules: The easiest way to do this is to amend the last commit: $ git clone -b "patch-1" [email protected]:xuhdev/docker.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fThis will update the existing PR, so you do not need to open a new one. |
|
Actually, |
|
It's not critical, but it is just better to replace the command with a dummy one. The reason to do this is that if someone accidentially start the data container, there will be no additional process to change the data in the container. |
|
@xuhdev thats a really good explanation of why you've done it, and I think you're right, especially for something like Could you add that explanation to your change? |
|
Ugh.. I looked more at your PR title than the context of where you are changing the code. Just FYI--for busy people, a brief title that gives a closer representation of what you are doing is good, and an initial commit comment that explains can be helpful too! :) Other than my own personal problems, @SvenDowideit is exactly right.. for a data container it does make sense to replace the entrypoint! The other thing I've seen in blogs documenting data volumes is that usually people don't understand why it's not recommended to use a "small" image like busybox but rather the same image as your runtime like this example is showing; don't know if this doc should be updated with the reasoning that I've seen elsewhere, but basically if your runtime container and data container are based from the same image, then all those layers are shared, but if the data container is "some other image", then you will actually waste more space for even the "small" content of your data volume image. |
"docker create" for data containers should specify a dummy command to avoid accidential "docker start" to cause unexpected data loss. Signed-off-by: Hong Xu <[email protected]>
|
Sorry for the confusion, now updated :) @estesp I agree that using the same image can save space, but I don't think a |
|
LGTM, I think there has been a lot of back and forth but someone else can feel free to make another patch explaining it will also use the entrypoint if otherwise, perhaps @SvenDowideit |
|
LGTM |
Update doc: "docker create" must specify a command
No description provided.