Docker Tip #87: Run Multiple Docker Compose Files with the -f Flag

preview_player
Показать описание
We'll cover using the -f flag along with the COMPOSE_FILE environment variable.

Hit the subscribe button to receive more videos like this!

REFERENCE LINKS
---------------------------------------------------

COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.

THE TOOLS I USE / GEAR
---------------------------------------------------

FOLLOW ME ELSEWHERE
---------------------------------------------------

TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:21 -- Taking a look at each Docker Compose YAML file
0:42 -- Applying this to a mono repo multi-service use case
1:10 -- Running our command with a few -f flags and visiting the echo server
1:43 -- Using the COMPOSE_FILE env variable to pre-set which files to run
2:50 -- Checking which order files will be loaded using the config command
3:28 -- The reference notes for this video is on my blog
Рекомендации по теме
Комментарии
Автор

This video is great... as long as you set the playback speed at 75%.

martinmendez
Автор

This has to be the most concise tutorial I've ever seen on youtube
Thanks you!

Sarrus
Автор

Awesome Nick! my immediate question after watching the video is: how to link services split into multiple repos?
i.e. the BE defined into a repository with its own docker-compose file and the same for the frontend.

ruisugarushia
Автор

Hi, great description. My question is: How to stop the services separately? For example, stop only the service b.

redakker
Автор

what is the use override.yml compose file. Like if there is a compose file which contains the basic functionality and then on creates an override file where some modifications are made. Why the second file got created.

userasd
Автор

Hi Does there any one know, how to use commands in container

kkliang
Автор

For me, `docker-compose -f a.yml -f b.yml up`
would only run the a.yml, then stopped.

`docker compose b.yml up` runs properly.
and running `docker-compose -f a.yml -f b.yml up -d` did not help.

can't figure why this happens. Please help :(

chiu-minglam