Docker CLI: Docker Images
Learn useful Docker CLI commands related to Docker Images.
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
...