Skip to content

Use COMPOSE_PROJECT_NAME or -p with the up command #13839

Description

@mathroc

Description

When a project already exists, I would like to be able to do COMPOSE_PROJECT_NAME=myproject docker compose up to update the stack when its config changed for example, or do --force-recreate some-service, etc.

It's useful when docker compose is wrapped by other tools adding their own config file to the docker compose project but in different folders (eg: devcontainer, devpod) since I can't just go to the folder where the docker-compose.yml is, I would have to also figure out where are all the other config files and specify them.

but this is information that's already known by docker compose:

❱ docker compose ls
NAME                STATUS              CONFIG FILES
iterou              running(3)          /home/mathieu/Projects/iterou/.devcontainer/docker-compose.yml,/tmp/devcontainer-zed/docker_compose_build.json,/tmp/devcontainer-zed/docker_compose_runtime.json

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions