Docker-compose
Used to run multiple containers on same host
Outdated better to use docker stack/kubernetes now apparently
Commands
Cmd
Effect
docker-compose up
Run containers
docker-compose build
Build containers
docker-compose exec {service name} sh
Enter service shell
Setup
The Compose file is a YAML file defining services, networks and volumes. The default path for a Compose file is ./docker-compose.yml
.
docker-compose.yml
Config Options
build
build
can be specified either as a string containing a path to the build context
image
This results in an image named webapp
and tagged tag
, built from ./dir
.
Last updated