Skip to content

Feature to name container from "docker-compose run" #1347

Closed

Description

@EntilZha

This is a feature proposal/request to add a capability to docker-compose run. I have checked in the docker and docker-dev IRC channels and looked at prior issues and it seems this isn't on the radar.

Currently, if you have a docker-compose.yml you can start a specific container with possibly its dependencies using docker-compose run CONTAINER_NAME. However, this starts/creates a new container with the ordinary compose name appended by _run_1, where 1 could be any number. There is no way to tell docker-compose what this should be named.

The main use case would be overriding the run command for a specific container (in my case flags for development/production mode), but keeping the original name. This change would allow for this and also be flexible enough to support any name.

Activity

  1. dnephin commented on Apr 24, 2015

    @dnephin

    This is blocked on #1066, and there is discussion there about making this possible once it's complete.

  2. EntilZha commented on Apr 24, 2015

    @EntilZha
    Author

    Sounds great that its on the roadmap.

  3. aanand commented on Jun 5, 2015

    @aanand

    Closing in favour of #1518

  4. jylin commented on Jul 4, 2016

    @jylin

    Thanks for this feature. I notice that "docker-compose run " doesn't seem to use the custom name. I think I would expect that as well to use the container_name as opposed to just for "up".

  5. xelibrion commented on Sep 15, 2016

    @xelibrion

    @aanand I just experienced the same issue as @jylin - docker-compose run does not seem to use container_name configuration parameter, seems like a bug.

  6. alkiskal commented on Dec 7, 2016

    @alkiskal

    Any news on what @xelibrion mentions? I experienced the exact same behaviour docker-compose version 1.9.0, build 2585387

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions