Skip to content
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

OSX container name format incorrect #8808

Closed
v0l opened this issue Oct 19, 2021 · 4 comments
Closed

OSX container name format incorrect #8808

v0l opened this issue Oct 19, 2021 · 4 comments

Comments

@v0l
Copy link

v0l commented Oct 19, 2021

Description

On MacOS container names are in the incorrect format, containing a - instead of an _

<project>_<service>_<index>_<slug>

Steps to reproduce the issue:

  1. docker compose up (On OSX)
  2. docker compose up (On Windows)

Describe the results you received:
Containers on OSX contain - separator.
Containers on Windows contain _ separator.

Describe the results you expected:
Name format should be the same for all platforms.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Windows: Docker Compose version v2.0.0-rc.3
OSX: Docker Compose version v2.0.0

Output of docker info:

Windows:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.6.1-docker)
  compose: Docker Compose (Docker Inc., v2.0.0-rc.3)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 19
  Running: 15
  Paused: 0
  Stopped: 4
 Images: 27
 Server Version: 20.10.8
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e25210fe30a0a703442421b0f60afac609f950a3
 runc version: v1.0.1-0-g4144b63
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.16.3-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 25GiB
 Name: docker-desktop
 ID: KZWF:XGDX:X7BD:EMTZ:57OD:3URA:XRCJ:WFMD:3POD:EEXV:5VF2:VVEJ
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

OSX:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.6.3)
  compose: Docker Compose (Docker Inc., v2.0.0)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 16
  Running: 12
  Paused: 0
  Stopped: 4
 Images: 9
 Server Version: 20.10.8
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e25210fe30a0a703442421b0f60afac609f950a3
 runc version: v1.0.1-0-g4144b63
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.47-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 1.939GiB
 Name: docker-desktop
 ID: H5LG:2GJP:7BAS:MXYC:QNCQ:X6KA:SNGD:WKMD:UUH7:OE3L:TWMK:NP4W
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details:
Windows OS: 10
Mac OSX: Big Sur

@mat007
Copy link
Member

mat007 commented Oct 19, 2021

You’re not using the same compose version on both platforms. 😁

This behaviour is intentional, see #8655
You can get underscores by using --compatibility.

@v0l
Copy link
Author

v0l commented Oct 19, 2021

You’re not using the same compose version on both platforms

They are both on ComposeV2, maybe its worth documenting somewhere that the name format is changing? Like here: https://docs.docker.com/compose/cli-command/

@v0l
Copy link
Author

v0l commented Oct 19, 2021

I updated my windows install to to V2.0.0 and its containing a - now.

@v0l v0l closed this as completed Oct 19, 2021
@mat007
Copy link
Member

mat007 commented Oct 19, 2021

They are both on ComposeV2, maybe its worth documenting somewhere that the name format is changing? Like here: https://docs.docker.com/compose/cli-command/

That is a good suggestion. We have a list of changes from V1 to V2 like that one to publish, we really need to do it.
Thanks for the nudge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants