docker-sample
docker build -t node-web-app .
Running your image with -d runs the container in detached mode, leaving the container running in the background. The -p flag redirects a public port to a private port inside the container. Run the image you previously built:
- docker run -p 49160:8080 -d /node-web-app
Get container ID
- docker ps
Print app output
- docker logs
curl -i localhost:49160