Docker Common Commands

Source: Internet
Author: User
Tags echo command docker run

Each parameter represents what it means, at the bottom of the text.


#搜索名称含有centos的镜像

Docker Search CentOS

#查看当前系统拥有的镜像

Docker images

#获取名称为centos的镜像

Docker Pull CentOS

#删除名称为centos的镜像

Docker RMI CentOS

#强制删除名称为centos的镜像

Docker Rmi-f CentOS

#使用centos镜像运行一个容器, the echo command is executed inside the container (the container closes after the end)

Docker run Centos/bin/echo ' hellow word '

#启动一个已停止的容器

Docker start d6504d6a6c76

#使用centos镜像运行一个容器, the container name is MYCENTOS01, the host name of the specified container is local, remains open, and a TTY is opened (that is, start the container and enter the container)

Docker run-it--name mycentos01-h Local CentOS

#获取容器名称为mycentos01的pid

Docker Inspect--format "{{. State.pid}} "mycentos01


-I. Let the container out of the open state
-T Turn on a pseudo terminal
--name Give a name to a container
-D Let the container run in the background
-H

Specify container host Name






(not finished)


This article is from "the blog of the Flower in the Love Mirror" blog, please make sure to keep this source http://qingmi.blog.51cto.com/11352461/1760660

Docker Common Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.