docker/pull

Pull Image

Download an image from a remote registry.

images
registry
download

Command

docker pull

Explanation

docker pull downloads images and their layers from a registry. If no tag is specified, it defaults to 'latest'. It supports authentication for private registries and incremental downloads if layers already exist.

Common Use Cases

  • Obtain base images for building applications
  • Download specific image versions for reproducibility
  • Fetch updates for commonly used images

Best Practices

  • Always specify image tags explicitly
  • Verify image signatures when possible

Common Mistakes to Avoid

  • Forgetting to specify tag and unintentionally pulling 'latest'
  • Not logged into private registry

Troubleshooting

Problem: Authentication error when pulling private image

Solution: Run docker login <registry> to authenticate.

Problem: Slow or stuck downloads

Solution: Use a mirror registry or check network connectivity.

Examples

Pull latest Ubuntu image

docker pull ubuntu

Pull specific version of nginx

docker pull nginx:1.25