Skip to content

Docker compose automatic container naming on Sox and Linux ('_' vs. '-') #6035

Description

@atomcat1978
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID:

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

  • macOS Version: macOS 12.0.1 (21A559)
  • Intel chip or Apple chip: Intel chipset, 2,4 GHz 8-Core Intel Core i9
  • Docker Desktop Version: Docker Desktop 4.1.1 (69879)

Steps to reproduce the behavior

  1. Run docker-compose up on linux.
  2. Run docker-compose up on Mac + Docker Desktop.
  3. Check the created container names (projectName-serviceName-1 (OSx) vs. projectName_serviceName_1 (linux))

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