Docker Documenation References:
The purpose of this kata is to familarize yourself with the process of creating a container with a specific name.
In this exercise we will pull and image and create a container with a specific name using that image.
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 create --name docker_katas_nginx -p 80:80 nginx:alpine
Output
thought:DockerKata rich$ docker create --name docker_katas_nginx -p 80:80 nginx:alpine
52450ca5b4a9926bb18594fac1c6677fe50c99af995d9720ace45b81dd88bc0e
Command
docker ps -a
Output
thought:DockerKata rich$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
52450ca5b4a9 nginx:alpine "nginx -g 'daemon ..." 37 seconds ago Created docker_katas_nginx