Docker - 名称已被容器使用 [英] Docker - Name is already in use by container

查看:54
本文介绍了Docker - 名称已被容器使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下命令运行 docker 注册表总是会引发错误:

Running the docker registry with below command always throws an error:

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.

我怎样才能避免这个错误?

推荐答案

我也对此感到困惑.这里有两个相关的命令:

I got confused by this also. There are two commands relevant here:

docker run  # Run a command in a **new** container

docker start  # Start one or more stopped containers

这篇关于Docker - 名称已被容器使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆