I am following this document to install gitlab docker image
, and get confused with the command:
docker run --name gitlab_data genezys/gitlab:7
Running and thus creating a new container even if it terminates still keeps the resulting container image and metadata lying around which can still be linked to.
So when you run docker run ... /bin/true
you are essentially creating a new container for storage purposes and running the simplest thing you can.
In Docker 1.5 was introduced the docker create
command so I believe you can now "create" containers without confusingly running something like /bin/true
See: docker create
This is new method of managing data volume containers is also clearly documented in the section Creating and mounting a Data Volume Container