Docker Common Commands

Source: Internet
Author: User

1: Search for Mirrors

Docker search Ubuntu


2: Download image, Dockerpool Community address dl.dockerpool.com:5000

Docker Pull Ubuntu:14.04docker Pull Dl.dockerpool.com:5000/ubuntu


3: View image

Docker images


4: Create a container, such as the plus-D parameter will run in the background,-it assign a pseudo terminal into the interactive

Docker run-it Docker.io/centos:6.6/bin/bash


5: View Container

Docker Ps-a


6: View container or mirror instance information

Docker inspect Docker.io/centosdocker inspect-f {". Architecture "}} 8b44529354f3//json format


7: View several mirrors, run several containers

Docker info


8: Create a container that runs after the process exits and deletes the container

Docker Run--rm-ti Docker.io/centos:6.6/bin/bash


9:docker the tag command to add a new label to the local mirror, such as adding a new mirror ubuntu:14,

Docker.io/ubuntu:latest is the registered address and tag

Docker tag Docker.io/ubuntu:latest ubuntu:14


10: View the container list

Docker Ps-a-Q


11: Remove container, container ID, first stop container in delete

Docker RM Contaninerid


12: Remove the image, register the server address and the representation, or the mirror ID can also be removed as parameter-F Force Delete

Docker RMI Repository:tagdocker RMI Image ID


13: See what the container is running

Docker exec-it Contaninerid/names Ps-ef


14: Start Container

Docker start Contaninerid


15: Stop Container

Docker Stop Contaninerid


16: View container log, container id:dea271f3c4b8

Docker logs Dea271f3c4b8


17: View the image history version

Docker History iamge_id



This article is from the "Runny nose" blog, be sure to keep this source http://noodle.blog.51cto.com/2925423/1726882

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.