docker로 Dropal(MaxOS X10.9.5) 실행(미완성)
하고 싶은 일
boot2docker 가져오기
첫 번째 Docker on Mac OS X(2014/04/09)시작...하지만 위 사이트는 docker0입니다.9.1 조금 낡은 모습.
(boot2 docker의 공식 pkg이 나왔습니다. 홈 brew에 대응할 수 없는 기술입니다.)
Qiita에 "Docker Mac"조회를 넣은 후 1.0에 대응하는 투고가 있습니다: Mac OS X에 Docker 1.0(2014/06/10) 설치. 따라서 이 투고를 참고하여 진행합니다.
8월 23일2.0이 출시되었기 때문에 DL입니다.
pkg을 간단하게 설치하고 Docker hub 계정(Giithub 계정과 연결)을 제작하여 드디어 boot2 docker를 실행합니다.
실행 후 터미널이 시작되고 DADADA 및 다음 명령이 실행됩니다.$ bash
bash-3.2$ unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH
bash-3.2$ mkdir -p ~/.boot2docker
if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi
/usr/local/bin/boot2docker init
/usr/local/bin/boot2docker up && export DOCKER_HOST=tcp://$(/usr/local/bin/boot2docker ip 2>/dev/null):2375
docker version
bash-3.2$ if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi
bash-3.2$ /usr/local/bin/boot2docker init
Generating public/private rsa key pair.
Your identification has been saved in /Users/kamehiro17/.ssh/id_boot2docker.
Your public key has been saved in /Users/kamehiro17/.ssh/id_boot2docker.pub.
The key fingerprint is:
7d:bc:70:8b:48:a4:5e:de:b8:5b:e2:0f:3f:78:eb:45 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
(省略)
+-----------------+
bash-3.2$ /usr/local/bin/boot2docker up && export DOCKER_HOST=tcp://$(/usr/local/bin/boot2docker ip 2>/dev/null):2375
Waiting for VM and Docker daemon to start...
..............................................
Started.
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.xxx.xxx:2375
bash-3.2$ docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.3.1
Git commit (client): fa7b24f
OS/Arch (client): darwin/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.3.1
Git commit (server): fa7b24f
bash-3.2$
docker up
한 것 같으니까 튜토리얼대로 Hello World를 두드려 봐.$ docker run hello-world
Unable to find image 'hello-world' locally
Pulling repository hello-world
bf16b6e27882: Download complete
511136ea3c5a: Download complete
8f5550346e61: Download complete
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.
(Assuming it was not already locally available.)
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
For more examples and ideas, visit:
http://docs.docker.com/userguide/
$
Hello from Docker
나왔으니까 무조건 OK죠.
어떻게 하면 좋을지 몰라서 Qita를 다시 검색했다.
참고boot2 docker 공식.
물론Mac의 docker를 1.0으로 업그레이드 (2014/06/17)도요.$ export DOCKER_HOST=tcp://192.168.xxx.xxx:2375
$ boot2docker init
Virtual machine boot2docker-vm already exists
$ boot2docker up
Waiting for VM and Docker daemon to start...
..
Started.
Your DOCKER_HOST env variable is already set correctly.
$ boot2docker ssh
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
boot2docker: 1.2.0
3.16.1-config-file : e75396e - Fri Aug 22 06:45:30 UTC 2014
docker@boot2docker:~$
아, 귀엽다.
Dropal을 돌려보도록 하겠습니다.
정부 지침서.bash-3.2$ docker run -d -p 82:80 ricardoamaro/drupal-lamp
Unable to find image 'ricardoamaro/drupal-lamp' locally
Pulling repository ricardoamaro/drupal-lamp
e12abb230ef5: Download complete
(〜中略〜)
517b75a41a54: Download complete
02024baddfa37bd9650eb2df310cb90b706210b5d4d4a16f9810207c4183bb18
bash-3.2$
가능하므로 IP를 확인한 후 연결을 시도해 봅니다.$ boot2docker ip
The VM's Host only interface IP address is: 192.168.59.103
브라우저에서 192.168.59.103:82
로 연결됩니다.
ricardoamaro/drupal-lamp
됐어.
확인 과정.$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
02024baddfa3 ricardoamaro/drupal-lamp:latest "/bin/bash /start.sh 28 minutes ago Up 30 seconds 0.0.0.0:82->80/tcp nostalgic_stallman
좋다.동작이 가지런한 모습.
사이트를 만들 수 있습니까?먼저 계정을 만들려고 시도하지만
시스템에서 메일을 보낼 수 없을 것 같습니다.
오늘은 여기까지.
Reference
이 문제에 관하여(docker로 Dropal(MaxOS X10.9.5) 실행(미완성)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/nimneko_22/items/cdb4f6883a73a5328b9c
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ bash
bash-3.2$ unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH
bash-3.2$ mkdir -p ~/.boot2docker
if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi
/usr/local/bin/boot2docker init
/usr/local/bin/boot2docker up && export DOCKER_HOST=tcp://$(/usr/local/bin/boot2docker ip 2>/dev/null):2375
docker version
bash-3.2$ if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi
bash-3.2$ /usr/local/bin/boot2docker init
Generating public/private rsa key pair.
Your identification has been saved in /Users/kamehiro17/.ssh/id_boot2docker.
Your public key has been saved in /Users/kamehiro17/.ssh/id_boot2docker.pub.
The key fingerprint is:
7d:bc:70:8b:48:a4:5e:de:b8:5b:e2:0f:3f:78:eb:45 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
(省略)
+-----------------+
bash-3.2$ /usr/local/bin/boot2docker up && export DOCKER_HOST=tcp://$(/usr/local/bin/boot2docker ip 2>/dev/null):2375
Waiting for VM and Docker daemon to start...
..............................................
Started.
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.xxx.xxx:2375
bash-3.2$ docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.3.1
Git commit (client): fa7b24f
OS/Arch (client): darwin/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.3.1
Git commit (server): fa7b24f
bash-3.2$
$ docker run hello-world
Unable to find image 'hello-world' locally
Pulling repository hello-world
bf16b6e27882: Download complete
511136ea3c5a: Download complete
8f5550346e61: Download complete
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.
(Assuming it was not already locally available.)
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
For more examples and ideas, visit:
http://docs.docker.com/userguide/
$
$ export DOCKER_HOST=tcp://192.168.xxx.xxx:2375
$ boot2docker init
Virtual machine boot2docker-vm already exists
$ boot2docker up
Waiting for VM and Docker daemon to start...
..
Started.
Your DOCKER_HOST env variable is already set correctly.
$ boot2docker ssh
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
boot2docker: 1.2.0
3.16.1-config-file : e75396e - Fri Aug 22 06:45:30 UTC 2014
docker@boot2docker:~$
정부 지침서.
bash-3.2$ docker run -d -p 82:80 ricardoamaro/drupal-lamp
Unable to find image 'ricardoamaro/drupal-lamp' locally
Pulling repository ricardoamaro/drupal-lamp
e12abb230ef5: Download complete
(〜中略〜)
517b75a41a54: Download complete
02024baddfa37bd9650eb2df310cb90b706210b5d4d4a16f9810207c4183bb18
bash-3.2$
가능하므로 IP를 확인한 후 연결을 시도해 봅니다.$ boot2docker ip
The VM's Host only interface IP address is: 192.168.59.103
브라우저에서 192.168.59.103:82
로 연결됩니다.ricardoamaro/drupal-lamp
됐어.
확인 과정.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
02024baddfa3 ricardoamaro/drupal-lamp:latest "/bin/bash /start.sh 28 minutes ago Up 30 seconds 0.0.0.0:82->80/tcp nostalgic_stallman
좋다.동작이 가지런한 모습.사이트를 만들 수 있습니까?먼저 계정을 만들려고 시도하지만
시스템에서 메일을 보낼 수 없을 것 같습니다.
오늘은 여기까지.
Reference
이 문제에 관하여(docker로 Dropal(MaxOS X10.9.5) 실행(미완성)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/nimneko_22/items/cdb4f6883a73a5328b9c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)