docker ps
on your host. This will list all running containers. If you do not see your app, it is not running. It also shows you the ports your app is exposing. You can also do this via the remote API.docker attach <container id>
to attach to a certain container an see its stdout. You can run also run docker logs <container id>
to receive the Docker logs. What I prefer is to write the logs to a certain directory, e.g. all logs to /var/log
and mount this folder to my host machine. Then all your logs will end up in /home/ubuntu/docker-logs
on your host.--hostname='test42'
to the run
command). However, you mostly did not need that. EXPOSE
the port your app runs on:http://localhost:80
or http://127.0.0.1:80
.docker ps
or the remote API. If it is not running, check the logs for the reason.