文档介绍:安装Docker和下载images镜像和常用Docker命令
我的是centos7,也会6的方法:
$sudo yum install docker 直接yum安装contos7
启动Docker,并注册开机服务
[******@iZ258c9w799Z ~]# sudo service docker start
Redirecting to /bin/systemctl start
[******@iZ258c9w799Z ~]# sudo chkconfig docker on
Note: Forwarding request to 'systemctl enable '.
Created symlink from /etc/systemd/system/multi- to /usr/lib/systemd/system/.
//查看是否启动
[******@iZ258c9w799Z ~]# ps -ef|grep docker
root 12584 1 0 11:33 ? 00:00:00 /bin/sh -c /usr/bin/docker-current daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY 2>&1 | /usr/bin/forward-journald -tag docker
root 12585 12584 0 11:33 ? 00:00:00 /usr/bin/docker-current daemon --selinux-enabled
root 12586 12584 0 11:33 ? 00:00:00 /usr/bin/forward-journald -tag docker
root 12705 12448 0 11:34 pts/0 00:00:00 grep --color=auto docker
下载images镜像,现在下载基础的contos镜像:
[******@iZ258c9w799Z ~]# sudo docker pull centos:7
Trying to pull repository ... 7: Pulling from library/centos
1544084fad81: Pull complete
df0fc3863fbc: Pull complete
a3d54b467fad: Pull complete
a65193109361: Pull complete
Digest: sha256:a9237ff42b09cc6f610bab60a36df913ef326178a92f3b61631331867178f982
Status: Downloaded newer im