Several ways to create containers with docker

Release: 2020-04-03 14:11:50
Original
12403 people have browsed it

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 thedocker tutorialcolumn 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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!