What if a container name is already in use?

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.

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


Just an aside docker container ls -a will show containers running or stopped. You can force remove. Most likely when you started it went interactive. Check the environment variables to force the accept so if will run. You can do a docker log on the guid to see the output.

1 Like