Docker
/Beginner
docker pull
Definition
The CLI command used to download a Docker image or a repository from a public or private registry (like Docker Hub) to your local machine.
Explain Like I'm New
Downloading a blueprint from the internet to your laptop so you can use it later.
Real World Example
Typing `docker pull nginx` into the terminal. Docker connects to the internet, finds the official NGINX web server image, and downloads its layers to your hard drive.
Common Use Cases
- •Fetching dependencies
- •Updating images
Crucial Command Flags
| Flag / Option | Description |
|---|---|
| -a / --all-tags | Download all tagged images in the repository. |
| --quiet | Suppress verbose output (progress bars). |
Interview Questions
basic
- If you try to run an image you don't have locally, will Docker automatically pull it for you?
intermediate
- What happens if you run `docker pull ubuntu` five times in a row without deleting the image?