(Ubuntu 16.04 64bit)
Reference : https://docs.docker.com/compose/
git hub : https://github.com/docker/compose/releases
1. Define
Docker compose는 여러개의 container를 실행시키는데 사용하는 것이다.
2. Install Docker Compose
(ref : https://docs.docker.com/compose/install/)
$ sudo -s
$ sudo curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
3. Contents
- Project name은 유니크하게 만들어야한다.
...
4. Quickstart: Docker Compose and WordPress
(Ref : https://docs.docker.com/compose/wordpress/)
1) define project
- 폴더의 이름은 쉽게, 기억하기 쉬운것으로 한다.
- 폴더에는 build에 관한 이미지만 있어야한다.
- 폴더에는 docker-compose.yaml이라는 파일이 존재할 것이다.
$ mkdir my-wordpress
$ cd my-wordpress
$ vi docker-compose.yml
2) Run docker-compose
$ docker-compose up -d
Check runnig docker
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a68ff3a44819 wordpress:latest "/entrypoint.sh apach" 11 minutes ago Up 11 minutes 0.0.0.0:8000->80/tcp mywordpress_wordpress_1
359e505500db mysql:5.7 "docker-entrypoint.sh" 12 minutes ago Up 12 minutes 3306/tcp mywordpress_db_1
3) Check docker ip and connect wordpress
$ ifconfig
(check docker ip)
확인한 ip를 브라우져의 address에 넣고, port번호를 8000넣는다.
주소 : xxx.xxx.xxx.xxx:8000
(ref : http://bluese05.tistory.com/15)
+. $ docker-compose -h
'소프트웨어 > Docker' 카테고리의 다른 글
[Docker] How to use (Command) (0) | 2016.07.06 |
---|---|
[Docker] install, but error!! (include solution) (0) | 2016.07.05 |