docker error - 'name is already in use by container'

后端 未结 18 2079
暖寄归人
暖寄归人 2020-12-12 08:14

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

dev:tmp me$ docker run \\
     -d --name registry-v1 \\
     -e SETTINGS_         


        
18条回答
  •  北海茫月
    2020-12-12 08:52

    That means you have already started a container in the past with the parameter docker run --name registry-v1 ....

    You need to delete that first before you can re-create a container with the same name with docker rm registry-v1. When that container is sill running you need to stop it first before you can delete it with docker stop registry-v1. Or simply choose a different name for the new container.

    To get a list of existing containers and their names simply invoke docker ps -a.

提交回复
热议问题