centos安装docker
# https://yeasy.gitbooks.io/docker_practice/
# 安装docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce -y
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://bc437cce.m.daocloud.io
systemctl start docker
systemctl enable docker
# 配置远程连接
vim /etc/systemd/system/docker-tcp.socket
[Unit] Description=Docker Socket for the API [Socket] ListenStream=22375 BindIPv6Only=both Service=docker.service [Install] WantedBy=sockets.target # /etc/systemd/system/multi-user.target.wants/docker.service ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:27654 \ --graph /data/docker # 改变存储目录
systemctl daemon-reload
systemctl enable docker-tcp.socket(设置开机启动)
systemctl stop docker
systemctl start docker-tcp.socket
systemctl start docker
# 远程通信
docker -H ip info
# windows安装
http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/
https://download.docker.com
# 同步宿主机时间
docker cp /usr/share/zoneinfo/Asia/Shanghai d14:/etc/localtime