We have various docker-compose files that create a service infrastructure. My question is if it is possible to only create the volumes defined in the compose file without creating the containers?
We have various docker-compose files that create a service infrastructure. My question is if it is possible to only create the volumes defined in the compose file without creating the containers?
2
Answers
It might be possible without starting any services.
command can be provided like this.
Or it’s possible to specify individual volume.
You can use a
docker-compose.override.yml
file with invalid entrypoints or different image (use a small template image) for those containers, that way they’ll die immediately.docker-compose.override.yml: