Docker CLI: Docker Hub

Learn useful Docker CLI commands related to Docker Hub.

This chapter is a playground to learn and run the most common commands used with Docker.

Docker Hub

Log into Docker Hub

docker login

Or login to another registry:

docker login <url>
docker login -u <id> -p <password> <url>

Search Docker Hub

Search the Docker Hub image repository:

docker search [options] <keyword>

Example: find up to five Docker Hub images that reference php ordered by stars rating:

docker search --limit 5 php

Pull a Docker Hub image

Download one or more images from Docker Hub:

docker pull <image>

Example: pull the latest Node.js Long-Term-Support Alpine Linux image:

docker pull node:lts-alpine

Get hands-on with 1200+ tech skills courses.