Container problem on Docker

Asked

Viewed 332 times

1

Good I had set up a postgress container yesterday working normally, but today I went in and use the Docker ps and does not list any container, I tried to create a Docker container again using:

> docker run --name postgres -e POSTGRES_USER=spirit -e
> POSTGRES_PASSWORD=3613 -e POSTGRES_DB=testando -d -p 5432:5432
> postgres

but gave this error:

Error response from daemon: Conflict. The container name "/postgres" is already in use by container "2825eac0fd684e17fe79c7e2ff92b214862e34425545eac6d3195f2fb5b6e66a". You have to remove (or rename) that container to be able to reuse that name.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

saying that you already have a container with that name, but in Docker ps do not appear :(

i had this question while shutting down the pc as I start a container and someone could help me with this error?

3 answers

1


You’ve tried using the remote docker ps -a? It is the command that lists all the existing containers on your machine.

  • @Wilian Freitas turned out really kkk o-a saved, did not understand pq denied his reply, thank you man!!

  • I’m glad it worked out. You can consult other commands: link

0

I had the same problem, Executes the command docker restart /postgres or docker rm /postgres (to remove). Even if he is not listing in ps, he still has a running service. Try to remember the container name that Voce went up and even without appearing in ps, run the command.

I had this problem on Ubuntu, today just give a Restart and it works

  • the problem is that was giving only Docker ps was Docker ps -a kk ai worked out.. vlw man!!

0

In your case Docker ps lists the containers that are currently running, already the tag -the list all, including the stopped ones, in your case your container has stopped for some reason. You can use Docker start ( container name ) to upload it

Browser other questions tagged

You are not signed in. Login or sign up in order to post.