Yohan Graterol @yograterol
$ sudo pip install -U docker-compose
o
# curl -L https://github.com/docker/compose/releases/
download/1.2.0/docker-compose-`uname -s`-`uname -m`
> /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
app:
build: .
command: python app.py
ports:
- "3000:3000"
https://github.com/yograterol/compose-platzi-demo
$ cd <ruta_proyecto>
$ sudo docker-compose up
Recreating composedemo_app_1...
Attaching to composedemo_app_1
$ wget https://github.com/docker/machine/releases/
download/v0.2.0/docker-machine_linux-amd64
$ sudo mv docker-machine_linux-amd64 /usr/bin/docker-machine
$ sudo chmod +x /usr/bin/docker-machine
$ docker-machine create --driver virtualbox platzidev
$ eval "$(docker-machine env platzidev)"
$ docker ps
CONTAINER ID IMAGE COMMAND
$ sudo docker pull swarm
$ sudo docker run --rm swarm create
6856663cdefdec325839a4b9e2de38e1
$ docker -H tcp://0.0.0.0:2375 info
Containers: 0
Nodes: 3
agent-2: 172.31.40.110:2375
└ Containers: 0
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 514.5 MiB
agent-1: 172.31.40.109:2375
└ Containers: 0
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 514.5 MiB
agent-0: 172.31.40.108:2375
└ Containers: 0
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 514.5 MiB
#cloud-config
coreos:
units:
- name: etcd.service
command: start
users:
- name: core
passwd: $1$allJZawX$00S5T756I5PGdQga5qhqv1
write_files:
- path: /etc/resolv.conf
content: |
nameserver 192.0.2.2
nameserver 192.0.2.3