Command

Docker Build an Image Command

The Docker command to build an image is docker build -t NAME ..

Quick Answer

Command
docker build -t NAME .
DockerCommand

Build an Image

Type this command
docker build -t NAME .

Builds an image from the Dockerfile in the current folder.

Learn More

How to build an image in Docker

  1. Open the terminal or command interface for Docker.
  2. Type docker build -t NAME ., replace any placeholders, and run it.

Docker Build an Image Command

Run docker build -t NAME ..

Related Commands

Frequently asked questions

What is the Docker command to build an image?

Run docker build -t NAME ..

Where do I type this Docker command?

Type it in the terminal or command-line interface used by Docker.

Does this Docker command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify