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

Add docker create --name= --force #5023

Open
cmahnke opened this issue Apr 16, 2024 · 2 comments · May be fixed by #5036
Open

Add docker create --name= --force #5023

cmahnke opened this issue Apr 16, 2024 · 2 comments · May be fixed by #5036

Comments

@cmahnke
Copy link

cmahnke commented Apr 16, 2024

Description

To simplify scripting there should be a --force option when running docker create --name=. The implied behaviour would be that the provided name would be used, any previously created container with the same name be deleted.
Actually I was surprised that isn't already supported.

@vvoland
Copy link
Contributor

vvoland commented Apr 16, 2024

Why not just use docker container rm before docker create?

@cmahnke
Copy link
Author

cmahnke commented Apr 17, 2024

To have a symmetric user interface, many docker commands support a --force switch.

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

Successfully merging a pull request may close this issue.

2 participants