docker: Error response from daemon: Conflict. The container name “/xx“ is already in use by containe

问题:docker启动docker容器时报错

docker: Error response from daemon: Conflict. The container name "/xxxx" is already in use by container "518a610a0332457110e953ae187fe56c90efde820f76bd666bbcdeec87ac1f3e". You have to remove (or rename) that container to be able to reuse that name.

解决办法:

在此之前已经启动了相同名字的docker容器,The container name is already in use by container

You have to remove (or rename) that container to be able to reuse that name

那么你要这么查看你的容器已经存在相同名字容器呢?

只需要执行下列代码

docker ps

这样就找到了你想要找到容器,比如刚刚出现相同的名字时(将它删除再重新启动)

删除这个container

想要启动一个新的容器,可以删除已经存在的容器

docker rm 你的容器名字  --普通删除
docker rm -f xx   		 --强制删除

重新启动这个container

也可以重新启动已经存在的容器

docker start  你的容器名字
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值