Guillaume J. Charmes 12 роки тому
батько
коміт
84ceeaa870

+ 4 - 1
docs/sources/api/docker_remote_api_v1.2.rst

@@ -846,7 +846,7 @@ Build an image from Dockerfile via stdin
 
 
 .. http:post:: /build
 .. http:post:: /build
 
 
-	Build an image from Dockerfile via stdin
+	Build an image from Dockerfile
 
 
 	**Example request**:
 	**Example request**:
 
 
@@ -865,9 +865,12 @@ Build an image from Dockerfile via stdin
 	   {{ STREAM }}
 	   {{ STREAM }}
 
 
 	:query t: tag to be applied to the resulting image in case of success
 	:query t: tag to be applied to the resulting image in case of success
+	:query remote: resource to fetch, as URI
 	:statuscode 200: no error
 	:statuscode 200: no error
         :statuscode 500: server error
         :statuscode 500: server error
 
 
+{{ STREAM }} is the raw text output of the build command. It uses the HTTP Hijack method in order to stream.
+
 
 
 Check auth configuration
 Check auth configuration
 ************************
 ************************

+ 9 - 1
docs/sources/commandline/command/build.rst

@@ -29,7 +29,15 @@ Examples
 
 
 .. code-block:: bash
 .. code-block:: bash
 
 
-    docker build -
+    docker build - < Dockerfile
 
 
 | This will read a Dockerfile from Stdin without context. Due to the lack of a context, no contents of any local directory will be sent to the docker daemon.
 | This will read a Dockerfile from Stdin without context. Due to the lack of a context, no contents of any local directory will be sent to the docker daemon.
 | ADD doesn't work when running in this mode due to the absence of the context, thus having no source files to copy to the container.
 | ADD doesn't work when running in this mode due to the absence of the context, thus having no source files to copy to the container.
+
+
+.. code-block:: bash
+
+    docker build github.com/creack/docker-firefox
+
+| This will clone the github repository and use it as context. The Dockerfile at the root of the repository is used as Dockerfile.
+| Note that you can specify an arbitrary git repository by using the 'git://' schema.