Skip to content

Uppercase letters in service names result in Docker API errors #1416

@aanand

Description

@aanand

We allow uppercase letters in service names, but Docker doesn't allow them in image names.

When you use build, the name of the image we create is based on the service name. If it contains uppercase letters, Docker will refuse to create it.

Some options:

  1. Don't allow uppercase letters in service names. Nice and strict, but backwards-incompatible.
  2. Do allow them, but convert to lowercase when generating an image name. This will break in the extremely unlikely scenario that two services have the same name with different case. We could check for and forbid that case if we felt like it.
  3. Wait for images to be searchable by label, use labels for images (which we're going to do anyway, see Use labels to identify images instead of name convention #1403), and stop naming images based on the service name altogether.

But we've got to name them something, and it would be quite unhelpful not to incorporate the service name - right now it's nice that when I run docker images I can see which ones come from Compose, and what project/service they belong to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions