How to create a container with docker:
1. Use the docker pull command to download the container directly
Use the docker search centos6 command to search for the container in githup
Use docker pull weepee/centos6 to download the container to the local
2. Use the docker run command to create and start the container
docker run --name XXX -d 93d3d9bd44ca (image id)
docker run -it -v /data/xxx:/xxx (local path mapped to the container) -p 50299:50299 --name xxx 93d3d9bd44ca (image id) /bin/bash
For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.
The above is the detailed content of Several ways to create containers with docker. For more information, please follow other related articles on the PHP Chinese website!