Menu
Coddy logo textTech

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 alpine

Docker 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.20

Pulling an image you already have simply confirms it is up to date instead of downloading it again.

challenge icon

Challenge

Beginner

Pull 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 alpine

Pull a specific version using image:tag:

docker pull alpine:3.20

If 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

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Introduction to Docker