Transcript
Page 1: Containers #101 : Introduction to Docker Compose V2

Docker Compose V 2April 2016

Page 2: Containers #101 : Introduction to Docker Compose V2

About the meetup • A series of 30 min webinars & in person

meetup• Hands On• Online session are recorded• Suggested topics and presenters are

welcome

Recording available athttps://vimeo.com/channels/containers101

Page 3: Containers #101 : Introduction to Docker Compose V2

About me • Developer, entrepreneur and

technology enthusiast• Live in the Silicon Valley since 2008 • Founder and CEO of Codefresh

@RazielTabib

Page 4: Containers #101 : Introduction to Docker Compose V2

About codefreshContinuous Integration and Delivery platform built for Docker and microservices.

www.codefresh.io@codefresh

[email protected]

Page 5: Containers #101 : Introduction to Docker Compose V2

What we will see today• Intro to Docker Compose• Docker Compose 2 enhancements

– Services– Networks– Volumes

• Q&A

Page 6: Containers #101 : Introduction to Docker Compose V2

Docker ComposeCompose is a tool for defining and running multi-container Docker applications.Complete documentation @https://docs.docker.com/compose/overview/

Page 7: Containers #101 : Introduction to Docker Compose V2

Docker Compose exampleWeb: build: . ports: - “9000:9000” links: - mongo

mongo: image: mongo:latest

docker-compose.yml

nodejs Mongo

Lets chat app

Page 8: Containers #101 : Introduction to Docker Compose V2

Docker Compose V 2docker-compose.ymlversion: ‘2’

Services

Networks

Volumes

Page 9: Containers #101 : Introduction to Docker Compose V2

Servicesdocker-compose.ymlversion: ‘2’

Networks

Volumes

services:web: build: context: . dockerfile: Dockerfile image: demochatweb:0.1mongo: image: mongo

Page 10: Containers #101 : Introduction to Docker Compose V2

Networksdocker-compose.ymlversion: ‘2’services:

service1: image: ubuntu command: sleep 3600 networks: - internal1 - defaultservice2: image: ubuntu command: sleep 3600 networks: - internal1service3: image: ubuntu command: sleep 3600 networks: - default

networks: internal1: driver: bridge

Page 11: Containers #101 : Introduction to Docker Compose V2

Volumesdocker-compose.ymlversion: ‘2’services:

service1: image: ubuntu command: sleep 3600 volumes: - data:/dataservice2: image: ubuntu command: sleep 3600 volumes: - data:/data

volumes: data: driver: local

Page 12: Containers #101 : Introduction to Docker Compose V2

additional resources• Codefresh blog www.codefresh.io/blog• Vimeo channel www.vimeo.com/channels/containers101• Containers #101 http://www.meetup.com/Containers-101-online-meetup/

• Check us out @ www.codefresh.io

@codefresh


Top Related