Home  >  Article  >  Operation and Maintenance  >  Several ways to create containers with docker

Several ways to create containers with docker

尚
Original
2020-04-03 14:11:5012512browse

Several ways to create containers with docker

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

Several ways to create containers with docker

Use docker pull weepee/centos6 to download the container to the local

Several ways to create containers with docker

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn