I host my webapplication is a docker container using Dokku.
Sometimes (maybe every 1-2 days) the docker container just disappears (doesnt show when docker ps
) and as a result, my server goes down.
I haven't been able to find the cause.
I am looking for a way to debug this, any ideas?
The Docker logs will give you the stdout and stderr for the container. Your application may or may not provide useful information here.
docker logs <containerid_or_name>
The Docker daemon can manage a long running container for you with a --restart
policy.
docker run --restart=always <image>