Ver Fonte

Update docker build docs

Guillaume J. Charmes há 12 anos atrás
pai
commit
d97fff60a9
2 ficheiros alterados com 37 adições e 5 exclusões
  1. 29 3
      docs/sources/commandline/command/build.rst
  2. 8 2
      docs/sources/use/builder.rst

+ 29 - 3
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

+ 8 - 2
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 <src> <dest>``
+
+The `ADD` instruction will insert the files from the `<src>` path of the context into `<dest>` path 
+of the container.
+The context must be set in order to use this instruction. (see examples)
 
 3. Dockerfile Examples
 ======================