Install
Run this command to download the current stable release of Docker Compose:
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Apply executable permissions to the binary:
$ sudo chmod +x /usr/local/bin/docker-compose
Set a soft link
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Test the installation.
$ docker-compose --version
Usage
# List all running containers:
$ docker-compose ps
# Create and start all containers in the background using a docker-compose.yml file from the current directory:
$ docker-compose up -d
# Stop all running containers:
$ docker-compose stop
# Start all containers, rebuild if necessary:
$ docker-compose up --build
# Start all containers using an alternate compose file:
$ docker-compose --file path/to/file up
# Stop and remove all containers, networks, images, and volumes:
$ docker-compose down --rmi all --volumes
# Follow logs for all containers:
$ docker-compose logs --follow
# Follow logs for a specific container:
$ docker-compose logs --follow container_name
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper