2013-05-21 11:47:16 -06:00
|
|
|
:title: Build Command
|
|
|
|
:description: Build a new image from the Dockerfile passed via stdin
|
|
|
|
:keywords: build, docker, container, documentation
|
|
|
|
|
2013-05-29 11:53:44 -07:00
|
|
|
================================================
|
|
|
|
``build`` -- Build a container from a Dockerfile
|
|
|
|
================================================
|
2013-05-01 13:37:32 -07:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2013-05-30 12:35:19 -07:00
|
|
|
Usage: docker build [OPTIONS] PATH | -
|
|
|
|
Build a new container image from the source code at PATH
|
|
|
|
-t="": Tag to be applied to the resulting image in case of success.
|
2013-05-29 11:50:49 -07:00
|
|
|
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2013-05-30 12:35:19 -07:00
|
|
|
docker build .
|
2013-05-29 11:50:49 -07:00
|
|
|
|
2013-05-30 12:35:19 -07:00
|
|
|
This will take the local Dockerfile
|
2013-05-29 11:50:49 -07:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
docker build -
|
|
|
|
|
|
|
|
This will read a Dockerfile form Stdin without context
|