ubuntu18.04安装docker和开通对外2375端口(方便portainer管理)

date: 2019-08-03   21:39:37  

author: headsen chen

apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get -y install docker-ce
docker -v


cp  /lib/systemd/system/docker.service /lib/systemd/system/docker.service.bak 
vim /lib/systemd/system/docker.service     
这句改成这样的: ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 systemctl daemon
-reload systemctl restart docker netstat -plnt

 

posted @ 2019-08-03 21:43  开始认识  阅读(937)  评论(0编辑  收藏  举报