Ubuntu 17.10: Install docker-ce for container

This article will describe installing docker-ce. Please see here for usage of Docker.

1 Install docker-ce

Install packages which are needed for adding docker-ce repository.

$ sudo apt install -y apt-transport-https ca-certificates curl \
     software-properties-common

Add docker-ce repository.

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
     "deb https://download.docker.com/linux/ubuntu zesty stable"
$ sudo apt update -y

Install docker-ce.

$ sudo apt install -y docker-ce

Add user to docker group. Added user can run docker command without sudo command.

$ sudo gpasswd -a "${USER}" docker
$ sudo reboot

2 Execution result

Run hello-world.

$ docker run hello-world
<snip>
Hello from Docker!
<snip>