Last active
May 28, 2016 07:19
-
-
Save binario200/8f0ccda95ee3df2191df9d7dc60dba0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this time we will explore the use of Docker compose | |
// first check is already installed | |
docker-compose version | |
// for windows and mac is installed with docker tools | |
// linuxs users https://docs.docker.com/v1.5/compose/install/#install-compose | |
// could need to run the commands as super user | |
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
//check docker-compose version again | |
// We going to play with an app that is a simple Python+Mongo chat server composed of two services: web and db. | |
git clone https://github.com/nicolaka/dockchat.git | |
cd /dockchat | |
// lets build the images before run containers, this time with docker-compose | |
docker-compose build | |
// Bring the app up with the | |
docker-compose up | |
// or docker-compose up -d for de-attached mode of daemon mode. | |
// test the app | |
culr http://localhost:5000 | |
// or go to your browser http://container-ip:port | |
// linux users http://0.0.0.0:5000/ | |
// check your services running with | |
docker-compose ps | |
// or simple docker ps | |
// if you run docker-compose up -d | |
// to stop your services do | |
docker-compose stop | |
//If you’re using Docker Machine on a Mac, use docker-machine ip MACHINE_VM to get the IP address of your Docker host. | |
//Then, open http://MACHINE_VM_IP:5000 in a browser. | |
// it's done. | |
// Do you want more docker-compose ? | |
https://docs.docker.com/compose/ | |
// do you want your own wordpress on docker | |
https://docs.docker.com/compose/wordpress/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment