Search code examples
dockercontainers

Why does the docker container does not run?


I built a container on a private server running the command docker build -t image-name . and then ran it docker run -it image-name. But when I check the container list docker ps, it doesn't show.


Solution

  • Probably the container is failing to start and is not listed in the active containers of your server.

    1. Try to check the status of all your containers with docker ps -a docker ps.
    2. See the logs of the container using docker logs.