Docker Compose 101

Introduction

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services.

services:
agent:
image: "myservice_1"
command: ["--cache", "cache:6379", "--backend_http", "http://backend_service:4000" ]
environment:
JAVA_OPTS: -Xmx2g
volumes:
- /tmp/disk:/data
ports:
- 49100:22
cache:
image: "redis"
volumes:
- /tmp/disk:/data
expose:
- "6379"
backend_service:
image: "myservice_2"
command: ["--http_port", "4000" ]
volumes:
- /tmp/disk:/data
expose:
- "4000"

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store