首页 > 其他 > 详细

centos安装docker

时间:2020-01-15 20:56:38      阅读:81      评论:0      收藏:0      [点我收藏+]

# 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

centos安装docker

原文:https://www.cnblogs.com/ray-mmss/p/12198406.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!