MoreLean

Installation of docker 본문

Programmer/Docker

Installation of docker

judeKim' 2013. 8. 25. 02:38
반응형

Docker의 설치는 제약사항이 좀 있긴 하지만 비교적 간단하다.  

가장 손쉽게 Docker를 설치하는 방법은 아래의 리눅스 배포버전을 선택하는 것이다.

  - Ubuntu Precise 12.04 (LTS) 64bit

  - Ubuntu Raring 13.04 64bit

Docker는 크게 2가지의 의존성을 가지기 때문이다. 

  - Linux kernel 3.8 ( Kernel Requirements )

  - AUFS file system 지원

0.8 버전 ( 2013-08-25 현재 0.6 ) 부터는 RHEL이나, CentOS도 지원한다고하는 하는데, Kernel에 의존적인 사항을 어떻게 극복할지도 궁금해진다. [각주:1]


그럼 설치를 진행해보자. 

위에 언급한대로 Ubuntu Precise 12.04 (LTS) 64bit 리눅스 버전을 가지고 설치를 진행했다. 


먼저 의존 항목에 대해서 먼저 설치를 진행해야 한다.

Dependencies

- Linux kernel 3.8  

Ubuntu 12.04 의 기본 kernel 버전은 3.2 이다. 하지만, LXC의 버그로 인해 docker는 3.8 에서 제대로 동작한다. 이때문에 kernel 업그레이드가 필요하다. 

# install the backported kernel 

> sudo apt-get update

> sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

# reboot

> sudo reboot

 * 이과정에서 "/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory" 나 "/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory" 와 같은 메시지가 발생할때에는 아래 명령어를 실행해주면 해결할 수 있다. ( 저처럼 찜찜해하시는 분들을 위해.. )

> locale-gen ko_KR.UTF-8

> dpkg-reconfigure locales 

Installation

얼마전( 2013-08-23 )에 release 된 0.6 버전은 기존과 설치 방법이 바뀌었다. ( docker 의 버전은 내가 지금까지 봐왔던 오픈소스중에 가장 빠른 버전 업데이트가 되는것 같다. ) 

> sudo apt-get install curl

> sudo sh -c "curl http://get.docker.io/gpg | apt-key add -"

> sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"

> sudo apt-get update

> sudo apt-get install lxc-docker

Verification

> sudo docker run -i -t ubuntu /bin/bash

> exit


  1. 이미 CentOS 6.4 버전에서 설치한 사례도 있다. Kernel 의존적인 사항은 커널 요구사항 이상의 버전으로 -_-;; 극뽁~! ( CentOS 6.4 64bit 버전의 기본 kernel 버전은 2.6.32 버전이다. ) http://nareshv.blogspot.kr/2013/08/installing-dockerio-on-centos-64-64-bit.html [본문으로]
반응형

'Programmer > Docker' 카테고리의 다른 글

Repositories in docker  (0) 2013.08.28
Commands of docker  (0) 2013.08.26
docker 를 이해하기 위하여 #2  (0) 2013.08.22
docker 를 이해하기 위하여 #1  (0) 2013.08.22
About Docker  (0) 2013.08.21