Script performing docker compose actions in bulk
Find a file
2026-05-23 17:39:54 -04:00
docker-compose Initial commit 2026-05-23 17:39:54 -04:00
README.md Initial commit 2026-05-23 17:39:54 -04:00

Docker Bulk Compose

A nifty little script I made to make bulk-actions on docker containers in a single directory easier. For example, imagine your docker containers are stored like:

- /docker
    |
    |- caddy/
    |   |
    |   |- docker-compose.yml
    |   |
    |   |- Caddyfile
    |
    |- jellyfin/
    |   |
    |   |- docker-compose.yml
    |   |
    |   |- movies/
    |
    |- gitlab/
    |   |
    |   |- docker-compose.yml
    .   .
    .   .
    .   .

Then, to deploy this script, simply copy the shell script into the /docker directory, and run.

Usage

To use this script, simply run ./docker-compose {action} [subdirectory]. If a subdirectory is provided, perform on action on that container. Otherwise, perform that action on all containers. Valid actions include:

  • up
  • Runs the action docker compose up -d
  • down
  • Runs the action docker compose down
  • reload
  • Runs the action down, then up
  • pull
  • Runs the action down, then docker compose pull, then up