瀏覽代碼

Update docker build docs

Guillaume J. Charmes 12 年之前
父節點
當前提交
d97fff60a9
共有 2 個文件被更改,包括 37 次插入5 次删除
  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::
 .. note::
     The path must include the file name.
     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
 3. Dockerfile Examples
 ======================
 ======================