Browse code

Add docs for reading Dockerfile from stdin.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Daniel Nephin authored on 2017/04/11 05:47:41
Showing 2 changed files
... ...
@@ -345,6 +345,13 @@ This will use a file called `Dockerfile.debug` for the build instructions
345 345
 instead of `Dockerfile`.
346 346
 
347 347
 ```bash
348
+$ curl example.com/remote/Dockerfile | docker build -f - .
349
+```
350
+
351
+The above command will use the current directory as the build context and read
352
+a Dockerfile from stdin.
353
+
354
+```bash
348 355
 $ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug .
349 356
 $ docker build -f dockerfiles/Dockerfile.prod  -t myapp_prod .
350 357
 ```
... ...
@@ -4,7 +4,6 @@ import (
4 4
 	"archive/tar"
5 5
 	"bytes"
6 6
 	"fmt"
7
-	"github.com/docker/docker/pkg/testutil/assert"
8 7
 	"io"
9 8
 	"io/ioutil"
10 9
 	"os"
... ...
@@ -14,6 +13,8 @@ import (
14 14
 	"strings"
15 15
 	"testing"
16 16
 	"time"
17
+
18
+	"github.com/docker/docker/pkg/testutil/assert"
17 19
 )
18 20
 
19 21
 var tmp string