使用以下命令运行 docker
注册表总是会引发错误:
dev:tmp me$ docker run \
-d --name registry-v1 \
-e SETTINGS_FLAVOR=local \
-e STORAGE_PATH=/registry \
-e SEARCH_BACKEND=sqlalchemy \
-e LOGLEVEL=DEBUG \
-p 5000:5000 \
registry:0.9.1
Error response from daemon: Conflict. The name "registry-v1" is already in use by container f9e5798a82e0. You have to delete (or rename) that container to be able to reuse that name.
如何防止出现此错误?
最佳答案
我也被这个弄糊涂了。这里有两个相关的命令:
docker run # Run a command in a **new** container
docker start # Start one or more stopped containers
关于Docker - 名称已被容器使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31697828/