Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 1.62 KB

08_tag_an_image.md

File metadata and controls

69 lines (45 loc) · 1.62 KB

Tag an Image

Docker Documentation References:

docker tag

docker pull

docker images

Intent

The purpose of this kata is to familarize yourself with the process of tagging an image.

Overview

In this exercise we will pull and image for the NGINX Web Server and add a custom tag.

Kata Steps

Pull a simple image, nginx:alpine

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

Tag the Image

Command

docker tag nginx:alpine nginx:mine

Note: the use of mine as a tag is a totally arbitrary value for demonstration purposes

Inspect your Images

Command

docker images

Output

thought:DockerKata rich$ docker images
REPOSITORY                                   TAG                 IMAGE ID            CREATED             SIZE
nginx                                        alpine              f00ab1b3ac6d        2 weeks ago         15.5 MB
nginx                                        mine                f00ab1b3ac6d        2 weeks ago         15.5 MB

Previous | Index | Next