mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
39 lines
850 B
ReStructuredText
39 lines
850 B
ReStructuredText
:title: Build Command
|
|
:description: Build a new image from the Dockerfile passed via stdin
|
|
:keywords: build, docker, container, documentation
|
|
|
|
========================================================
|
|
``build`` -- Build a container from Dockerfile via stdin
|
|
========================================================
|
|
|
|
::
|
|
|
|
Usage: docker build [CONTEXT|-]
|
|
Build a new image from a Dockerfile
|
|
|
|
Examples
|
|
--------
|
|
|
|
.. code-block:: bash
|
|
|
|
docker build
|
|
|
|
This will take the local Dockerfile without context
|
|
|
|
.. code-block:: bash
|
|
|
|
docker build -
|
|
|
|
This will read a Dockerfile form Stdin without context
|
|
|
|
.. code-block:: bash
|
|
|
|
docker build .
|
|
|
|
This will take the local Dockerfile and set the current directory as context
|
|
|
|
.. code-block:: bash
|
|
|
|
docker build - .
|
|
|
|
This will read a Dockerfile from Stdin and set the current directory as context
|