Skip to content

runArgs: ["--name", "..."] causes duplicate --name flag in docker run #35

@wujekbogdan

Description

@wujekbogdan

First of all, thank you for building crib! I'm in the middle of migrating to dev containers and was honestly shocked that the official CLI provides zero shell support - requiring devs to docker exec into containers is terrible UX. Really glad crib exists and fills that gap.

That said, I ran into an issue:

runArgs: ["--name", "..."] causes duplicate --name flag in docker run

When devcontainer.json includes a custom container name via runArgs:

{
  "runArgs": ["--name", "my-container"]
}

crib passes both its own generated name (--name crib-<workspace>) AND the user-specified name (--name my-container) to docker run. Docker rejects this with exit status 125.

Expected behavior:

runArgs --name should either override crib's generated name, or crib should strip --name from runArgs and warn. The same logic should apply to any other flag that crib sets internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions