cli icon indicating copy to clipboard operation
cli copied to clipboard

Docker compose profile specification

Open varun-krishnamurthy opened this issue 3 years ago • 5 comments

Currently we have an application that can use either mariadb or postgresql. To achieve this, we leveraged docker-compose's profiles & environment variable COMPOSE_PROFILE to pass on the desired profile.

But devcontainer script is passing --profile * to the docker-compose command by default without taking into account the desired profile specified in COMPOSE_PROFILE.

Can the script be modified to look for COMPOSE_PROFILE variable first before setting --profile *?

varun-krishnamurthy avatar Oct 27 '23 05:10 varun-krishnamurthy

This makes sense to me. @varun-krishnamurthy would you be interested in contributing a CLI PR with this change? We appreciate support from the community. ✨

// cc @chrmarti Feel free to raise any concerns ^

samruddhikhandale avatar Oct 27 '23 22:10 samruddhikhandale

Look out for a PR soon.

varun-krishnamurthy avatar Oct 29 '23 07:10 varun-krishnamurthy

Maybe also, please allow passing dockerCompose args where we can set --env-file as well?

SDAdham avatar Apr 23 '25 03:04 SDAdham

@chrmarti @samruddhikhandale , can someone review this PR please: https://github.com/devcontainers/cli/pull/1042.

varkrish avatar Jul 01 '25 02:07 varkrish

Dear maintainers, PTAL at the PR above

AlekSi avatar Dec 21 '25 10:12 AlekSi