Search⌘ K
AI Features

Docker CLI: Docker Images

Explore how to build Docker images from Dockerfiles and custom files, apply tags, list existing images, and push them to Docker Hub. Understand key Docker CLI commands to manage images for web development projects.

Docker images

Build an image from a Dockerfile

docker image build -t <image_name> .

Assuming a Dockerfile is in the current directory:

docker image build -t myimage .

The option -t allows you to tag the image. In this case, the image named myimage is tagged latest as no tag was specified. The tag can be specified as:

docker image build -t
...