install on centos

  1. yum install -y gcc
  2. yum install -y yum-utils

安装阿里云镜像

  1. yum-config-manager \
  2. --add-repo \
  3. http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装docker

  1. yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin

启动docker

  1. systemctl start docker

查看docker进程

  1. ps -ef|grep docker

image.png
image.png

运行hello world

  1. docker run hello-world

image.png
停止docker

  1. sysstemctl stop docker