-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker compose automatic container naming on Sox and Linux ('_' vs. '-') #6035
Comments
We are having the same issue with our container names. Out of the blue, the container names changed from web_name_1 to web-name-1 after a rebuild and it broke a couple of scripts that actually rely on these old names. Are there any other solutions except for adding container_name to the docker-compose configuration? I know that once the container_name is added the containers itself cannot be scaled. |
I solved this issue on my local environment by turning off "Use Docker Compose v2" under Preferences > General. Not a long-term fix, but gets you by for the interim. |
@ryan-benedetti Seems like it is turned off on in my environment, still get dashes in the names. |
Looks related to docker/compose#8655. From that PR, it's possible to use the old names by using the |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
docker-compose up
should use same automatic naming conventions for service containers under Docker Desktop for Mac and on Linux docker versions.Actual behavior
On Linux Docker uses underscores (
_
), while on Docker Desktop for Mac dash (-
) is used.Information
Steps to reproduce the behavior
docker-compose up
on linux.docker-compose up
on Mac + Docker Desktop.The text was updated successfully, but these errors were encountered: