Docker-compose syntax

From wikinotes

Documentation

official docs https://docs.docker.com/compose/compose-file/

Example

docker-compose.yml

version: '2'
services:
  db:
    image: postgres:9.4.1
    ports:
      - "5432:5432"

  rails:
    build: .
    command: bin/rails server --port 3000 --binding 0.0.0.0
    ports:
      - "3000:3000"
    links:
      - db
    volumes:
      - .:/myapp
docker-compose build