Starting application container

suggest change

Once we have an image ready, we can start it and serve it. To create a container from the image, use

docker run -p 80:80 -d <Image name>

In the command above, -p 80:80 forwards port 80 on the host to port 80 in the container. The -d flag runs the container in the background. The final argument is the image used to create the container.

Checking container

In order to check running containers, simply use

docker ps

This lists the containers running on the Docker daemon.

Application logs

Logs are useful for debugging the application. To read them, use

docker logs <Container id>

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents