What if a container name is already in use?


#1

When I try to run the XL JetPack Release Docker image, I get:

docker: Error response from daemon: Conflict. The container name “/xlr” is already in use by container “b802801fbe7b8cefd2f9dc324d64d97dabb23e9ed8a9fcaae5d824d5580ef612”. You have to remove (or rename) that container to be able to reuse that name.


#2

You already have a container named xlr in your Docker. You can review all containers using the docker container ls --all command; that will show all containers, whether they’re running or not. (If you prefer to see containers in a GUI, check out Kitematic.) Then you can use docker container rm to remove the other xlr container or docker container rename to rename it.

Alternatively, you can adjust the Docker run command to use a different container name. For example, this would set the name to jetpack-release-trial:

docker run -e "ADMIN_PASSWORD=desired-admin-password" -e "ACCEPT_EULA=Y" -p 5516:5516 --name jetpack-release-trial xebialabs/xl-release:8.5