docker/build

Build Image

Build an image from a Dockerfile

image
build

Command

docker build

Explanation

Creates a new image from instructions in a Dockerfile. -t tags the resulting image.

Examples

Build from current directory

docker build -t my_image .

Specify Dockerfile

docker build -t my_image -f Dockerfile.prod .