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

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6


问题

The container name "/xiangheGuosanguan20200428" is already in use by container "8f2f22451b0a9aa54c18e6c68a28d676afb5d533e3f8d8f213e4f90652200ac0". You have to remove (or rename) that container to be able to reuse that name.

原因

已经有容器使用这个了。必须删除(或重命名)该容器才能重用该名称。

解决

先查看所有容器 找到你要部署的项目已经存在的容器,拿到他的CONTAINER-ID

命令1

查看运行的容器

docker ps -a

You have to remove (or rename) that container to be able to reuse that name._重命名

命令2

写你的容器名

rm -f xiangheGuosanguan20200428
docker ps -a

先删除容器,然后查看你的docker,看到底删除了没,(一般不报错就是删除成功)看不看随你

You have to remove (or rename) that container to be able to reuse that name._重命名_02

命令3

运行你的容器

docker run -d --name xiangheGuosanguan20200428 -p 8429:8383 -e context-path=xiangheGuosanguan20200428 -e auth-Url= -e httpName=https xianghe_guosanguan202003                   09:2.0

无报错为成功,再次查看容器发现有了就对了

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


阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6