Update doc: specify a dummy command for "docker create"
"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 <hong@topbug.net>
This commit is contained in:
parent
cfe5767045
commit
fb6fab83df
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ Let's create a new named container with a volume to share.
|
|||
While this container doesn't run an application, it reuses the `training/postgres`
|
||||
image so that all containers are using layers in common, saving disk space.
|
||||
|
||||
$ sudo docker create -v /dbdata --name dbdata training/postgres
|
||||
$ sudo docker create -v /dbdata --name dbdata training/postgres /bin/true
|
||||
|
||||
You can then use the `--volumes-from` flag to mount the `/dbdata` volume in another container.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue