Docker를 ubuntu 16.04 LTS에 설치하기


https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-convenience-script

가장 쉽게 설치 할수 있는 방법은 convenience script를 이용하는 것이다.
get.docker.com test.docker.com에서 각각 stable 버전과 testing 버전을 Docker Comunity Edition으로 받을 수 있다.
이러한 자동 스크립트 방식은 하나씩 설치하는 것이 비해서 간편하지만 아래와 같은 불이익이 있음을 공식 홈페이지에서 언급한다.

  • The scripts require root or sudo privileges in order to run. Therefore, you should carefully examine and audit the scripts before running them.
  • The scripts attempt to detect your Linux distribution and version and configure your package management system for you. In addition, the scripts do not allow you to customize any installation parameters. This may lead to an unsupported configuration, either from Docker’s point of view or from your own organization’s guidelines and standards.
  • The scripts install all dependencies and recommendations of the package manager without asking for confirmation. This may install a large number of packages, depending on the current configuration of your host machine.
  • Do not use the convenience script if Docker has already been installed on the host machine using another mechanism.

스크립트 실행

jaynux@jaynux-desktop:~$ curl -fsSL get.docker.com -o get-docker.sh
jaynux@jaynux-desktop:~$ sudo sh get-docker.sh

설치됨

# Executing docker install script, commit: 11aa13e
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl software-properties-common >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial edge" > /etc/apt/sources.list.d/docker.list
+ [ ubuntu = debian ]
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client:
 Version:      17.11.0-ce
 API version:  1.34
 Go version:   go1.8.3
 Git commit:   1caf76c
 Built:        Mon Nov 20 18:37:39 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.11.0-ce
 API version:  1.34 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   1caf76c
 Built:        Mon Nov 20 18:36:09 2017
 OS/Arch:      linux/amd64
 Experimental: false
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

참고문헌

초보를 위한 도커 안내서 -설치하고 컨테이너 실행하기


+ Recent posts