How to Install docker-ce in Ubuntu17

Server environment

1
2
3
4
5
$ cat /etc/issue
Ubuntu 17.10

$ docker -v
Docker version 17.09.0-ce, build afdb6d4

Install using the repository

1
2
$ sudo apt-get update
$ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

Add Docker’s official GPG key

1
2
3
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"

Install Docker-ce

1
2
$ sudo apt-get update
$ sudo apt-get install -y docker-ce

Update registry source

1
$ sudo vim /etc/systemd/system/multi-user.target.wants/docker.service

Specified the registry source

1
2
#ExecStart=/usr/bin/dockerd -H fd://
ExecStart=/usr/bin/dockerd -H fd:// --registry-mirror=https://registry.docker-cn.com

1
2
$ sudo service docker restart
$ sudo systemctl daemon-reload
Share