Hi... I am trying to run a container
However I receive an error that it already exist even when I list all of the containers with docker ps and there is no container listed.
The line inside the script is
docker run --name ldap-service --hostname ldap-service --detach osixia/openldap:1.1.1
Hi @pcastrotigre
docker ps
only shows running containers. To see a list of all your containers, you should use docker ps -a
- I'm quite confident the ldap-service
will show up among them.
The simple solution here is of course to run docker rm -f ldap-service
to remove the old container, and run your script again.
HTH!
It worked great... Thanks
Most helpful comment
Hi @pcastrotigre
docker ps
only shows running containers. To see a list of all your containers, you should usedocker ps -a
- I'm quite confident theldap-service
will show up among them.The simple solution here is of course to run
docker rm -f ldap-service
to remove the old container, and run your script again.HTH!