# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
# yum install docker
# docker version
# systemctl start docker.service
# systemctl enable docker.service
# vi /etc/sysconfig/docker
OPTIONS=‘--registry-mirror=https://xxxxxxx.mirror.aliyuncs.com‘
# systemctl restart docker.service
# docker search centos7
# docker pull centos:centos7
# docker images
# docker run -it centos:centos7 /bin/bash
# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
# exit
exit
#再打开一个登陆窗口查看
# docker ps
#docker停止后台运行的镜像?
# docker stop/kill (container_id)
# docker stop `docker ps|grep centos7 | awk { ‘print $1‘}`
时间: 2024-11-05 12:13:29