최근 주력으로 공부하고 있는 것은 Kubernetes와 Machine-Learning이다.

특히 현재 업무와도 관련이 있어서 더 깊이 보고 있는 것이 바로 Kubernetes인데, 이와 관련된 새로운 책 하나를 살펴보게 되었다.



취향 저격!


요즘 IT 서적들은 표지도 너무 잘 만들고, 타이포그라피도 너무 잘 하는 것 같다.

그리고, 왠지 모르게 레벨업 욕구를 불러일으키게 "15단계"라니...




희한하게 요즘 보는 책들의 지은이가 계속 일본인이네...

지은이가 IBM 클라우드 소속이라서, 책에서도 IBM 클라우드를 소개했구나 ... ^^



15단계로 구성되었다고 하지만,

1장은 단계에 속하지 않은 사전 학습 내용으로 되어있다.



2장부터 1단계 시작이다.



그런데, 살펴보면 다른 책에서는 잘 보지 못하는 재미있는 항목이 보인다.



각 Step의 뒷 부분을 보면, "참고 자료"를 하나의 섹션으로 넣어 놓았다.


실제 내용을 보면 아래와 같이 되어있다.



추가적으로 공부를 더 해보고 싶은 경우, 이 내용을 참조하면 많은 도움이 될 것 같다.



책 내용은 깔끔하다.

다만, Why 에 대한 설명을 해주는 책은 아니고, How 위주로 설명을 해주는 책으로 보인다.




설명도 잘 되어 있고, 실행 예도 잘 보여주고 있다.


다만, 15단계에 따라 하나씩 직접 해보면서 어떤 명령어들을 사용하는지 배우기에는 적합하지만,

왜 이런 구성을 가지고 있는지 등에 대해서 파악하려면 다른 책을 보는 것이 나을 것 같다.


직접 몸으로 부딪히면서 배우는 것을 좋아하시는 분들에게 추천할 수 있는 책이다.




※ 제이펍 서평단 활동을 위해 지급 받은 도서에 대한 리뷰입니다.

반응형


오래된 노트북으로 서버 한 대를 셋팅하던 중, Docker를 설치하는 과정을 기록해보려 한다.



공식 홈페이지 가이드를 따라서 진행했다.

- https://docs.docker.com/engine/installation/linux/ubuntu/



※ 이 블로그를 계속 봐오신 분들은 아시겠지만... 아래 내용은 직접 실행해보면서 작성한 것입니다.



1. Ubuntu version

    - Ubuntu Focal 20.04 (LTS)


❯ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 20.04.1 LTS

Release: 20.04

Codename: focal


❯ uname -a  

Linux whatwant 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux



2. Binary 확인

    - 웹으로 다운로드 받을 버전을 확인하자.


https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/



3. Download 받기


$ wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/containerd.io_1.4.3-1_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce-cli_20.10.1~3-0~ubuntu-focal_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce_20.10.1~3-0~ubuntu-focal_amd64.deb



4. Docker 설치하기


$ sudo dpkg --install ./containerd.io_1.4.3-1_amd64.deb

$ sudo dpkg --install ./docker-ce-cli_20.10.1~3-0~ubuntu-focal_amd64.deb

$ sudo dpkg --install ./docker-ce_20.10.1~3-0~ubuntu-focal_amd64.deb



5. sudo 없이 실행하기


$ sudo usermod -aG docker $USER


  - 로그아웃 후 재로그인해야 적용



6. Hello World


$ docker run hello-world

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

0e03bdcc26d7: Pull complete 

Digest: sha256:1a523af650137b8accdaed439c17d684df61ee4d74feac151b5b337bd29e7eec

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.

    (amd64)

 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://hub.docker.com/


For more examples and ideas, visit:

 https://docs.docker.com/get-started/



끝~



반응형


Prologue #1


최근 Docker Hub 이야기가 Hot 했다.


무료로 마음껏 사용했던 Docker Hub였는데,

Rate Limit 제한을 하게 되어 의도치 않은 Fail 메시지들을 보게 되어 다들 부랴 부랴 계정 등록하기도 하고 라이선스 구매를 하기도 하고...


특히 통합 빌드서버를 사용하는 경우

미리 준비하지 않은 경우 빌드서버에서 rate limit가 걸려 빌드가 계속 fail 되는 사태가 발생해버렸기에 난리였다!



Prologue #2


요즘 Kubernetes 공부를 하고 있는데,

Local에서만 하기에는 좀 제한적이어서 Google Cloud Platform(GCP) 환경에서 테스트를 해보고 있다.


그런데, Minikube 환경에서는 Local에서 만든 Container Image를 반영하기가 손쉬웠는데

GCP에 있는 K8s 환경에서는 그냥은 안되는 것 같다.


Docker Hub에 Local에서 만든 Container Image를 업로드 하면 손쉽게 될 것만 같다.





Body


우선 Docker Hub 사이트에 방문을 해보자.


https://hub.docker.com/



첫 페이지부터 Sign Up을 요구한다.

ID 넣고 Email 넣고 Password 넣고 로봇이 아니라고 체크 한 번 해주고 가입 완료하자.

발송된 Email에서 Confirm 한 번 눌러주면 최종적으로 가입 완료된다.



Sign In 화면은 아래와 같다.




로그인 후 첫화면은 아래와 같다.





그러면, 이제 docker login을 해보자.


실습 환경은 "Ubuntu 18.04" 이다.


Docker 설치는 아래 링크를 참조하기 바란다.

- https://whatwant.tistory.com/entry/Docker-Install-Ubuntu-16041804-64bit-using-Download



일단 login을 시도해보자.


$ docker login



뭔가 permission error가 발생한다.




그러면, Permission 이슈를 해결하고, 다시 해보자.


$ sudo chmod 666 /var/run/docker.sock


$ docker login



잘 되었다 !!!



push 과정까지 실제로 따라해보려면 실습 코드들이 필요하기에 이후 내용은 아래 GitHub Repo를 참고해서 진행하자.


- https://github.com/whatwant-school/docker-hub/tree/main/step01



$ docker build -t ${username}/count:v1 .


$ docker push ${username}/count:v1



Docker Hub에 접속해서 제대로 올라왔는지 확인해보자.




여기까지~!!

반응형


docker-compose를 사용할 일이 있어서

docker 설치 후에 바로 docker-compose를 실행하려고 했더니 안되는 것이다.


알고보니 docker-compose는 별도로 설치를 해야한단다.


기본 레퍼런스는 아래 링크이다.

    - https://docs.docker.com/compose/install/


1. dependency packages


$ sudo apt-get install python-pip python-dev libffi-dev libssl-dev gcc libc6-dev make



2. download and setting


$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

$ sudo chmod +x /usr/local/bin/docker-compose

$ docker-compose --version


최신 버전은 직접 확인해보고 진행해보시길...


반응형


오랜만에 ubuntu에서 docker를 설치하려고 했는데...

Ubuntu 14.04 환경에서 설치가 안되었다. 이런... (https://www.whatwant.com/863)

뭐 이젠 14.04를 놓아줄 때도 된 것 같아서 ... 이를 극복하기 보다는 16.04 환경에서 진행해보기로 했다.

추가로 18.04에서도 해봤다.



공식 홈페이지 가이드를 따라서 진행했다.

- https://docs.docker.com/engine/installation/linux/ubuntu/



※ 이 블로그를 계속 봐오신 분들은 아시겠지만... 아래 내용은 직접 실행해보면서 작성한 것입니다.

※ VirtualBox를 이용하여 해당 OS를 설치하고 update까지만 마친 상태에서 진행하였습니다.




1. Ubuntu version

    - Ubuntu 14.04는 이제 지원하지 않는 것으로 보인다.

    - 특히, 64bit 만 지원한다! 32bit 안된다!



2. Binary 확인

    - 웹으로 다운로드 받을 버전을 확인하자.




3-1. Download 받기 (16.04)


$ wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce-cli_18.09.7~3-0~ubuntu-xenial_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_18.09.7~3-0~ubuntu-xenial_amd64.deb


3-2. Download 받기 (18.04)


$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_18.09.7~3-0~ubuntu-bionic_amd64.deb

$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_18.09.7~3-0~ubuntu-bionic_amd64.deb



4-1. Docker 설치하기 (16.04)


$ sudo dpkg --install ./containerd.io_1.2.6-3_amd64.deb

$ sudo dpkg --install ./docker-ce-cli_18.09.7~3-0~ubuntu-xenial_amd64.deb

$ sudo dpkg --install ./docker-ce_18.09.7~3-0~ubuntu-xenial_amd64.deb


4-2. Docker 설치하기 (18.04)


$ sudo dpkg --install ./containerd.io_1.2.6-3_amd64.deb

$ sudo dpkg --install ./docker-ce-cli_18.09.7~3-0~ubuntu-bionic_amd64.deb

$ sudo dpkg --install ./docker-ce_18.09.7~3-0~ubuntu-bionic_amd64.deb




5. Hello World


$ sudo docker run hello-world

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

1b930d010525: Pull complete 

Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8

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.

    (amd64)

 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://hub.docker.com/


For more examples and ideas, visit:

 https://docs.docker.com/get-started/



끝~



반응형

 

Docker에서는 이미 주어진 Image들을 다운로드 받아서 사용하고 있다.

그러면, 이러한 Image들은 어디에 있는 것일까?!

 

"Docker Hub"라는 공식적으로 운영하고 있는 Image Server가 바로 그 곳이다.

 

이름에서 떠오르는 것과 같이.... GitHub와 같은 역할을 하는 아이다.

소스코드가 아닌 Docker Image를 저장하는 그 곳!

명령어도 유사하다~

 

 

 

 

 

그런데, 우리는 (나 혼자만?) 공식적인 것 말고.... 사적인 것, 나만의 것을 갖고 싶은 욕구가 있다.

즉, 나만의 Docker Hub를 운영하고 싶으면 어떻게 해야할까?

 

 

 

이럴 때 필요한 구글신께 외치는 주문~!!!

   - Docker Registry Server Install

 

그러면, 게시를 내려주시는 우리의 구글신님~!!!

   - https://docs.docker.com/registry/deploying/

 

 

 

 

우리가 지금부터 해야할 것은 "Docker Registry Server"를 구축하는 것이다.

 

 

 

 

 

Docker와 관련이 있는 것이니만큼, Docker Registry Server 역시 Docker 이미지로 배포가 된다.

즉, 별도의 설치과정 없이 이미지를 다운로드 받아서 실행하면 된다는...

 

하지만, 언제나처럼 제대로 사용하기 위해서는 공부를 해야하고, 시행착오를 겪어야 한다는... ^^

 

 

 

 

 

일단, Docker를 설치해야한다.

   - [ Docker Install (Ubuntu 14.04 - 64bit) - using Download ] : http://www.whatwant.com/863

 

 

 

이제 우리가 필요한 Registry Server의 이미지를 땡겨오자.

 

$ sudo docker pull registry
Using default tag: latest
latest: Pulling from library/registry
90f4dba627d6: Pull complete
3a754cdc94a5: Pull complete
0756a217635f: Pull complete
f82b9495c796: Pull complete
154ef19ddee6: Pull complete
Digest: sha256:5eaafa2318aa0c4c52f95077c2a68bed0b13f6d2b464835723d4de1484052299
Status: Downloaded newer image for registry:latest

 

$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
registry              latest              c2a449c9f834         3 days ago          33.2 MB
hello-world         latest              1815c82652c0        2 weeks ago         1.84 kB

 

 

 

 

실행은 간단하다.

 

$ sudo docker run --name my-registry -d --restart=always -p 5000:5000 registry
0af462462b05ea13191470dff48ab52edf2206b65c885d2d82fd5c319daca63a

 

$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
0af462462b05        registry            "/entrypoint.sh /e..."   9 seconds ago       Up 8 seconds        0.0.0.0:5000->5000/tcp   my-registry

 

"--name" 옵션 뒤에 앞으로 사용할 Container 이름을 임의로 지어주면 되고...

"-d" 옵션을 통해서 Daemon으로 실행하고 싶다고 알려주고~

"--restart=always" 옵션을 통해서 Container 안에서 프로세스가 죽더라도 항상 재시작을 하도록 하고~

"-p" 옵션으로 포트 매핑을 해주면 된다.

 

제일 뒤에는 원본(?)으로 사용할 이미지를 지정해준다.

 

ps를 통해서 실행되고 있는 모습을 확인해볼 수 있다.

 

 

 

 

 

지금 실행해 놓은 Registry를 실험해보기 위해서, 등록해볼 마루타를 하나 만들어보자.

 

 

 

Dockerfile을 하나 만들어보자.

 

$ nano ./Dockerfile

 

FROM busybox
MAINTAINER whatwant <whatwant@gmail.com>
CMD /bin/echo "hi-world!!"

 

방금 만든 마루타의 Dockerfile을 빌드해서 이미지로 만들어보자.

 

$ sudo docker build -t hi-world .
Sending build context to Docker daemon 2.048 kB
Step 1/3 : FROM busybox
 ---> c30178c5239f
Step 2/3 : MAINTAINER whatwant <whatwant@gmail.com>
 ---> Running in 6115aa49c789
 ---> efaf526395ee
Removing intermediate container 6115aa49c789
Step 3/3 : CMD /bin/echo "hi-world!!"
 ---> Running in b57e417ec463
 ---> 0983858cdd37
Removing intermediate container b57e417ec463
Successfully built 0983858cdd37

 

$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hi-world            latest              0983858cdd37     14 seconds ago       1.11 MB
registry             latest              c2a449c9f834        3 days ago           33.2 MB
busybox            latest              c30178c5239f        2 weeks ago         1.11 MB
hello-world       <none>           1815c82652c0        2 weeks ago         1.84 kB

 

 

 

이미지를 만들었으면, 이제는 우리의 Registry Server에 등록을 해보자.

 

$ sudo docker tag hi-world localhost:5000/hi-world


$ sudo docker push localhost:5000/hi-world
The push refers to a repository [localhost:5000/hi-world]
3a1dff9afffd: Pushed
latest: digest: sha256:b182254942f5ffeb903b7125c4693e12c2330db6c16a75681e76c633535edade size: 527

 

잘 등록되었는지 확인도 해보자.

 

$ curl -X GET http://localhost:5000/v2/_catalog
{"repositories":["hi-world"]}

 

$ curl -X GET http://localhost:5000/v2/hi-world/tags/list
{"name":"hi-world","tags":["latest"]}

 

 

 

 

이번에는 Registry Server를 제대로 사용할 수 있는지 확인해보자.

그런데, 이미 가지고 있는 이미지들이 있으니 테스트를 위해서 확인하고 지워놓자.

 

$ sudo docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
hi-world                  latest              81d1537591cc        32 minutes ago      1.11 MB
localhost:5000/hi-world   latest              81d1537591cc        32 minutes ago      1.11 MB
registry                  latest              c2a449c9f834        3 days ago          33.2 MB
busybox                   latest              c30178c5239f        2 weeks ago         1.11 MB
hello-world               latest              1815c82652c0        2 weeks ago         1.84 kB

 

hi-world, localhost:5000/hi-world 2개의 이미지가 있다. 지우자!

 

$ sudo docker rmi hi-world
Untagged: hi-world:latest


$ sudo docker rmi localhost:5000/hi-world
Untagged: localhost:5000/hi-world:latest
Untagged: localhost:5000/hi-world@sha256:410ad4c96024f632bde893190d71a3c10457419c50375ab1d878f2ad67d76775
Deleted: sha256:81d1537591cc43e879aeed3e0556788f9b6b75ab6377fd1db6c9266472f27f09
Deleted: sha256:358acd2e8b9f52adffcdd2870487bdc36d7842677d602ffdf533776ac55a7574

 

$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
registry            latest              c2a449c9f834        3 days ago          33.2 MB
busybox             latest              c30178c5239f        2 weeks ago         1.11 MB
hello-world         latest              1815c82652c0        2 weeks ago         1.84 kB

 

hi-world 이미지가 없는 것을 확인했다.

이제 땡겨오자.

 

 

$ sudo docker pull localhost:5000/hi-world
Using default tag: latest
latest: Pulling from hi-world
27144aa8f1b9: Already exists
Digest: sha256:410ad4c96024f632bde893190d71a3c10457419c50375ab1d878f2ad67d76775
Status: Downloaded newer image for localhost:5000/hi-world:latest

 

$ sudo docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
localhost:5000/hi-world   latest              81d1537591cc        33 minutes ago      1.11 MB
registry                  latest              c2a449c9f834        3 days ago          33.2 MB
busybox                   latest              c30178c5239f        2 weeks ago         1.11 MB
hello-world               latest              1815c82652c0        2 weeks ago         1.84 kB

 

잘 받아온 것을 확인했다.

 

 

동작이 잘되는지도 확인해보자.

 

$ sudo docker run localhost:5000/hi-world
hi-world!!

 

물론 잘된다.

 





혹시 아래와 같은 에러가 발생할 경우에는...


$ sudo docker pull xxx.xxx.xx.xx:5000/asdf

Using default tag: latest

Error response from daemon: Get https://xxx.xxx.xxx.xxx:5000/v1/_ping: http: server gave HTTP response to HTTPS client



아래와 같이 환경설정을 해주면 된다.


$ sudo nano /etc/default/docker

 

...

# Use DOCKER_OPTS to modify the daemon startup options.

#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

DOCKER_OPTS="--insecure-registry xxx.xxx.xxx.xxx:5000"

...


$ sudo service docker restart

 



 

기본적인 사항은 여기까지 해서 살펴보았지만...

아직 사용하기에는 문제가 많이 있는 상태이다.

 

당장 인증 관련한 부분에 있어서 문제가 있다. 아무나 쓸 수 있도록 한다면 뭐 무방하지만.... ^^

LDAP과 같은 계정서버와의 연계라던지 아니면 로드밸런싱이라던지... 등 알아봐야할게 아직 많다.

 

뭐 일단, 이번 포스트는 여기까지~

 

반응형

2019.07.07


간만에 해보려고 했더니, 에러가 발생한다.

공식 가이드에도 14.04 버전에 대한 가이드 내용이 사라졌다.

아래 내용은 그냥 참고만 하시길...


============================================================================================


공식 홈페이지에 너무나 잘 나와있다.

- https://docs.docker.com/engine/installation/linux/ubuntu/



공식 홈페이지 내용 참고해서 직접 해보면서 진행했던 내용의 기록이다.

하나씩 따라가보자.


※ 이 블로그를 계속 봐오신 분들은 아시겠지만... 아래 내용은 직접 실행해보면서 작성한 것입니다.

※ VirtualBox를 이용하여 해당 OS를 설치하고 update까지만 마친 상태에서 진행하였습니다.




1. Ubuntu version

    - Docker에 대한 환상을 갖고 있었다. OS에 의존하지 않고 자유로운.... 하지만 꽝!

    - Ubuntu 14.04, 16.04, 16.10 만 지원하고 있다.

    - 특히, 64bit 만 지원한다! 32bit 안된다!



2. 필요 패키지 설치 (Ubuntu 14.04)

    - Ubuntu 14.04 버전에서만 하면 된다고 한다.


sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual



3. Binary 확인

    - 웹으로 다운로드 받을 버전을 확인하자.




4. Download 받기


$ wget https://download.docker.com/linux/ubuntu/dists/trusty/pool/stable/amd64/docker-ce_17.03.1~ce-0~ubuntu-trusty_amd64.deb



5. Docker 설치하기


sudo dpkg --install ./docker-ce_17.03.1~ce-0~ubuntu-trusty_amd64.deb



6. Hello World


$ sudo docker run hello-world

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

78445dd45222: Pull complete 

Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7

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/



끝~

반응형

 


공식 홈페이지에 너무나 잘 나와있다.

- https://docs.docker.com/engine/installation/linux/ubuntu/



공식 홈페이지 내용 참고해서 직접 해보면서 진행했던 내용의 기록이다.

하나씩 따라가보자.


※ 이 블로그를 계속 봐오신 분들은 아시겠지만... 아래 내용은 직접 실행해보면서 작성한 것입니다.

※ VirtualBox를 이용하여 해당 OS를 설치하고 update까지만 마친 상태에서 진행하였습니다.




1. Ubuntu version

    - Docker에 대한 환상을 갖고 있었다. OS에 의존하지 않고 자유로운.... 하지만 꽝!

    - Ubuntu 14.04, 16.04, 16.10 만 지원하고 있다.

    - 특히, 64bit 만 지원한다! 32bit 안된다!



2. 필요 패키지 설치 (Ubuntu 14.04)

    - Ubuntu 14.04 버전에서만 하면 된다고 한다.


sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual



3. GPG Key 등록 준비


sudo apt-get install apt-transport-https ca-certificates curl software-properties-common



4. GPG Key 등록하기


curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88



5. apt 소스 리스트 추가하기


sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

$ sudo apt-get update



6. Docker 설치하기


sudo apt-get install docker-ce



7. Hello World


$ sudo docker run hello-world

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

78445dd45222: Pull complete 

Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7

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/



끝~

반응형

+ Recent posts