Skip to content

mw container run replaces a container with the same name #2125

Description

@martin-helmich

Describe the bug A clear and concise description of what the bug is.

Repeated invocations of mw container run with a --name <NAME> flag replace an already existing containers with the same name.

This behaviour is surprising to a user, and inconsistent with (for example) docker run.

To Reproduce Steps to reproduce the behavior:

  1. Run mw container run --name test alpine /bin/sleep 3600
  2. Run the exact same command again
  3. Observe that the first container is replaced without any mention

Expected behavior

I would expect for the second command to be denied. The equivalent docker error message in this case is Conflict. The container name "/<NAME>" is already in use by container "<ID>". You have to remove (or rename) that container to be able to reuse that name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions