docker-compose specify file run as detach mode

Dokcer

Tips

1
2
3
4
5
6
7
8
9
10
11
# correct
# -d detach mode
# -f specify compose file
docker-compose -f ~/path/to/docker-compose.yaml up -d


# incorrect: cuz `-d` is not a option of `docker-compose`
docker-compose -d -f ~/path/to/docker-compose.yaml up

# incorrect: cuz `-f` is not a option of `up` command
docker-compose up -d -f ~/path/to/docker-compose.yaml

Reference

dokcer-compose
docker-compose up