FahamLah

Commands

docker build -t

docker build -t <name:tag> [-f Dockerfile] <folder>

Risk: Safe

What it does

Turns a Dockerfile (the recipe) into an image.

When to use it

Each time your app or recipe changes.

Example

$ docker build -t diary:1.0 .

Build this folder into diary:1.0.

$ docker build --target build -t app:build .

Stop at one stage of a multi-stage recipe.

$ docker build --no-cache -t diary:1.0 .

Bake every layer again.