You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature to name container from "docker-compose run" #1347
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.
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".
@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.
Reacted by Skipper Seabold, Aaron Ackerman, Thushan Fernando, Jérémy Mathevet, Will Frew, Peter Tröger, Kirby Rs and Adrien Becchis
Activity
dnephin commentedon Apr 24, 2015
This is blocked on #1066, and there is discussion there about making this possible once it's complete.
EntilZha commentedon Apr 24, 2015
Sounds great that its on the roadmap.
aanand commentedon Jun 5, 2015
Closing in favour of #1518
jylin commentedon Jul 4, 2016
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".
xelibrion commentedon Sep 15, 2016
@aanand I just experienced the same issue as @jylin -
docker-compose rundoes not seem to usecontainer_nameconfiguration parameter, seems like a bug.alkiskal commentedon Dec 7, 2016
Any news on what @xelibrion mentions? I experienced the exact same behaviour
docker-compose version 1.9.0, build 2585387Bump google.golang.org/grpc from 1.67.0 to 1.69.2 (docker#1347)