docker build¶
Description¶
Builds an image from a Dockerfile and a build context (a folder of files).
Syntax¶
Common Options¶
| Option | Description |
|---|---|
-t NAME:TAG |
Name and tag the image |
-f FILE |
Use a Dockerfile with a different name or location |
--no-cache |
Build without using the layer cache |
--build-arg KEY=VALUE |
Pass a build-time variable |
Example¶
The . is the build context: the current folder.