docker run --name test -it debian
Start container named test from the image debian.
docker run --cidfile /tmp/docker_test.cid ubuntu echo "test"
ubuntu boot image from a new container, the test output terminal, and the vessel /tmp/docker_test.cid id saved in a file.
docker run -t -i --privileged ubuntu bash
--privileged parameters to improve the operating authority of the container, the container can do things so that the host can do all.
docker run -w /path/to/dir/ -i -t ubuntu pwd
-w parameter specifies the next pwd command in the container / path / to / dir / directory, the directory does not exist will be created.
docker run -v /host:/container -w /container -i -t ubuntu bash
/ Host host directory / directory name within the container vessel, the host -v parameter directory mapping into the container.