참고문서:
https://docs.docker.com/engine/installation/ubuntulinux/
https://docs.docker.com/engine/userguide/
https://docs.docker.com/engine/userguide/basics/
I. 설치
1. 설치(ubuntu 14.04 에서).
아래 커맨드로, docker repository를 위한 pgp key를 등록한다.
# apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.fq7Qgn6cd8 --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server pgp.mit.edu
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
docker repository를 등록한다. /etc/apt/sources.list.d/docker.list 화일을(없으면 만들고) 아래와 같이 편집한다. os version이 ubuntu14.04이므로 trusty repository를 등록.
#vi /etc/apt/sources.list.d/docker.list
# Ubuntu Trusty
deb https://apt.dockerproject.org/repo ubuntu-trusty main
ubuntu 14.04 이전 버전에서는 설치 시 커널을 업그레이드 해 주어야 하지만, 여기서는 14.04 이기 때문에, 커널 업그레이드는 필요 하지 않다.
# apt-get install docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
aufs-tools cgroup-lite git git-man liberror-perl
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-arch git-bzr git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
aufs-tools cgroup-lite docker-engine git git-man liberror-perl
0 upgraded, 6 newly installed, 0 to remove and 3 not upgraded.
Need to get 9,067 kB of archives.
After this operation, 50.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Continue reading