우분투16 docker 설치

(우분투16 docker CE 설치에서 넘어옴)

1 개요[ | ]

Get Docker CE for Ubuntu 16
우분투16 docker 설치
apt install docker-ce

2 확인[ | ]

root@zetawiki:~# docker -v
The program 'docker' is currently not installed. You can install it by typing:
apt install docker.io
root@zetawiki:~# apt list docker docker-engine docker.io
Listing... Done
docker/xenial 1.5-1 amd64
docker.io/xenial-updates 1.12.6-0ubuntu1~16.04.1 amd64

3 apt update[ | ]

root@zetawiki:~# apt update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

4 apt install[ | ]

root@zetawiki:~# apt install apt-transport-https ca-certificates curl software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20160104ubuntu1).
apt-transport-https is already the newest version (1.2.24).
curl is already the newest version (7.47.0-1ubuntu2.2).
software-properties-common is already the newest version (0.96.20.7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

5 apt-key[ | ]

root@zetawiki:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
root@zetawiki:~# apt-key fingerprint 0EBFCD88
pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22

6 add-apt-repository[ | ]

root@zetawiki:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
root@zetawiki:~# cat /etc/apt/sources.list | grep docker
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable

7 apt update 2[ | ]

root@zetawiki:~# apt update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-security InRelease
Get:4 https://download.docker.com/linux/ubuntu xenial InRelease [38.9 kB]
Get:5 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages [1,966 B]
Fetched 40.9 kB in 1s (39.8 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

8 apt install[ | ]

root@zetawiki:~# apt install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  aufs-tools cgroupfs-mount
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount docker-ce
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.6 MB of archives.
After this operation, 96.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B]
Get:3 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce amd64 17.06.0~ce-0~ubuntu [20.5 MB]
... (생략)
Processing triggers for libc-bin (2.23-0ubuntu9) ...###############################....] 
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...

9 버전 확인[ | ]

root@zetawiki:~# apt list docker-ce -a
Listing... Done
docker-ce/xenial,now 17.06.0~ce-0~ubuntu amd64 [installed]
docker-ce/xenial 17.03.2~ce-0~ubuntu-xenial amd64
docker-ce/xenial 17.03.1~ce-0~ubuntu-xenial amd64
docker-ce/xenial 17.03.0~ce-0~ubuntu-xenial amd64
root@zetawiki:~# docker -v
Docker version 17.06.0-ce, build 02c1d87
→ 17.06.0 버전이 설치됨

10 테스트[ | ]

root@zetawiki:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b04784fba78d: Pull complete 
Digest: sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

11 같이 보기[ | ]

12 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}