Pulling Images
Part of the Introduction to Docker section of Coddy's Terminal journey — lesson 3 of 40.
Before you can run a container, Docker needs the image on your machine. The docker pull command downloads an image from a registry (a public library of images):
docker pull alpineDocker fetches the image and reports each layer as it arrives, finishing with a status line. If you do not specify a version, Docker pulls the latest tag by default.
You can ask for a specific version using image:tag:
docker pull alpine:3.20Pulling an image you already have simply confirms it is up to date instead of downloading it again.
Challenge
BeginnerPull the nginx image with docker pull. Watch the output confirm the download.
Cheat sheet
Use docker pull to download an image from a registry:
docker pull alpinePull a specific version using image:tag:
docker pull alpine:3.20If no tag is specified, Docker pulls the latest tag by default. Pulling an already-present image simply confirms it is up to date.
Try it yourself
This lesson includes a short quiz. Start the lesson to answer it and track your progress.