Docker Documentation References:
The purpose of this kata is to familarize yourself with the process of pulling an image from a repository and running it.
In this exercise we will pull an image for the NGINX Web Server and run it using only defaults. Later we will use this image to demostrate other features of docker.
Command
docker pull nginx:alpine
Output
thought:DockerKata rich$ docker pull nginx:alpine
alpine: Pulling from library/nginx
cfc728c1c558: Pull complete
59e0e447b6ec: Pull complete
1c89b5c5bd38: Pull complete
584d454ad7fd: Pull complete
Digest: sha256:33eb1ed1e802d4f71e52421f56af028cdf12bb3bfff5affeaf5bf0e328ffa1bc
Status: Downloaded newer image for nginx:alpine
Command
docker run -p 80:80 nginx:alpine
Output
thought:DockerKata rich$ docker run -p 80:80 nginx:alpine
Command (in another terminal):
open http://localhost:8080
Or click here
Note: This works because your meta-docker container has exposed port 80 on localhost port 8080. If you are executing this kata outside of the meta-docker contianer use port 80 only.
Output
Use Ctrl-C
on the command line where you executed