Docker commands

Create docker:

> docker run -d -P --name jenkins-master -v /Users/codebased/docker:/jenkins-data jenkins

To start/restart/kill the existing docker by name

> docker start/restart/kill jenkins-master

==========================================

It will get you a list of volumes that your containers are referring to.

> docker volume list

If you want to access the docker file system as a root user.

> docker exec -it --user root <containerid/name> bash

By default the vim is not present in docker. you can install with these two command:

> apt-get update
> apt-get install vim