Pull Docker Image
In this module, we will explore pulling Docker images from the internal Docker Registry, which would be similar to pulling images from Docker Hub.
Pull Docker Image from Internal Docker Registry
Currently you have no Docker images to build or run a container.
While you simply could perform a docker run
on a supported Docker image and let the Docker image be pulled down automatically, we're going to approach this
in steps.
You are going to pull an image from the internal Docker Registry by performing a docker pull
. For more
information, please refer to the Docker Docs on
docker pull.
The reason you're pulling a pre-built image is simply to save time in the lab as it would take several minutes to build the image due to all the packages and libraries being used in the lab. Ideally, once you learn the tool(s) you want to work with, they are the only library packages that installed into your Docker image or container. This keeps the image or container light-weight.
The Dockerfile and how-to-guide on building the Docker image used for this lab is included in the Additional References section.
Pull the ltrsdn-2260
image from the internal Docker Registry:
sudo docker pull ciscolive-docker-registry-2:5000/ltrsdn-2260
Verify Local Docker Images
To see the images available directly on your Docker host issue the docker images
command.
For more
information, please refer to the Docker Docs on
docker images.
sudo docker images
Your Docker host should now have the ltrsdn-2260 Docker image in it's local image repository.
[pod00user@ciscolive-pod00-centos ~]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ciscolive-docker-registry-2:5000/ltrsdn-2260 latest d0d2d1f0817b About an hour ago 4.62GB
Continue on to the next module to learn how to start a Docker container that mounts an external volume. The container you start in the next module will be your development container environment going forward.