diff --git a/docs/sources/commandline/command/build.rst b/docs/sources/commandline/command/build.rst index a8d2093a5b..0cb6463e4c 100644 --- a/docs/sources/commandline/command/build.rst +++ b/docs/sources/commandline/command/build.rst @@ -8,6 +8,32 @@ :: - Usage: docker build - - Example: cat Dockerfile | docker build - - Build a new image from the Dockerfile passed 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 diff --git a/docs/sources/use/builder.rst b/docs/sources/use/builder.rst index 4e53ed4a79..abd5b9ecb1 100644 --- a/docs/sources/use/builder.rst +++ b/docs/sources/use/builder.rst @@ -125,8 +125,14 @@ curl was installed within the image. .. note:: The path must include the file name. -.. note:: - This instruction has temporarily disabled +2.8 ADD +------- + + ``ADD `` + +The `ADD` instruction will insert the files from the `` path of the context into `` path +of the container. +The context must be set in order to use this instruction. (see examples) 3. Dockerfile Examples ======================