docker compose. I want that when profile dev is active, to use a set of volumes. Otherwise, another one

docker compose conditional volumes for dev profile configuration

Focused on the specific functionality of conditional volume usage in Docker Compose when using a development profile, which will yield more relevant results related to configuration examples and best practices.

When working with Docker Compose

Related Searches

Sources

10
1
Docker-compose, conditional statements? (e.g. add volume only if ...
Stack Overflow

I want to add a volume to my service, but only if the final user gave a folder for it. Otherwise, no volume should be mounted.

2
Leveraging Docker Compose profiles | by Szabolcs Toth | Medium
Medium

We discussed the use of Docker Compose profiles to manage different environments within a single docker-compose.yml file. Profiles allow you to ...

3
Use service profiles - Docker Docs
Docs

Profiles help you adjust your Compose application for different environments or use cases by selectively activating services.

4
Volumes - Docker Docs
Docs

Compose offers a neutral way for services to mount volumes, and configuration parameters to allocate them to infrastructure.

5
Docker Compose best practices for dev and prod - Hacker News
News

Variables? Pass in some env vars. Conditionals? You can specify multiple configuration files so that whatever calls `docker compose up` can deal ...

6
Conditional directive for docker-compose up -d #8639 - GitHub
GitHub

So you have to either enable explicit profiles by docker compose --profile x up or set COMPOSE_PROFILES environment variable with profile you ...

7
Docker Compose Profiles, one the most useful and underrated ...
Event-driven

They're a way to logically group services inside your Docker Compose definition, allowing you to run a subset of services.

8
Extend - Docker Docs
Docs

Docker Compose's extends attribute lets you share common configurations among different files, or even different projects entirely.

9
Docker Compose Reference | Okteto Documentation
Okteto

Okteto implements and extends the Compose Specification to make it easy to develop Docker Compose applications in Kubernetes.

10
Services - Docker Docs
Docs

The following example demonstrates how to define two simple services, set their images, map ports, and configure basic environment variables using Docker ...