CentOS Install Docker

Source: Internet
Author: User
Tags docker ps

    1. Install prerequisite Software

      Yum-y install iptables iptables-services net-tools vim wget

    2. Installing Docker
      Yum-y Install Docker
    3. Download CentOS image
      Docker Pull CentOS
    4. View CentOS Images
      Docker Images CentOS
    5. Run a Docker container
      Docker Run-i-T Centos/bin/bash
    6. Search Ubuntu Images
      Docker Search Ubuntu
    7. Display a running container (you need to create a container first)
      Docker PS
      Docker Ps–a displays all containers (including closed or exited containers)
    8. Running a container in the background
      Docker Run-i-t-d Centos/bin/bash
    9. Stop a container running in the background
      Docker stop "Container ID"
    10. Delete Container
      Docker RM "Container ID"
    11. Force removal of a mirror
      Docker rmi-f "Mirror ID"
    12. Start a mirror and create a container

      Docker Run-i-T Centos:v1/bin/bash

      Background starts a mirror and creates a container

      Docker Run-i-t-d Centos:v1/bin/bash

      Export the Image: Docker save-o Centos_v1.tar CENTOS:V1

      Import the Image: Docker load--input Centos_v1.tar

      Enter a container: Docker Attach < container id>, CTRL + C after input is complete to enter the container

    13. Quick access to container: Http://www.hjue.me/post/docker-nsenter

CentOS Install Docker

Related Article

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.