Posts tagged "config"

Use multiple files for docker-compose config

You can specify one or multiple config files for docker-compose with the -f flag:

# one file
docker-compose -f docker-compose.yml up -d
# multiple files
docker-compose -f docker-compose.yml -f docker-compose.tests.yml up -d

Be sure to specify the config files before the sub-command:

# invalid
docker-compose ps -f docker-compose.yml
# valid
docker-compose -f docker-compose.yml ps