Selaa lähdekoodia

Add docs for reading Dockerfile from stdin.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Daniel Nephin 8 vuotta sitten
vanhempi
commit
e838679cd7
2 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 7 0
      docs/reference/commandline/build.md
  2. 2 1
      pkg/archive/archive_test.go

+ 7 - 0
docs/reference/commandline/build.md

@@ -344,6 +344,13 @@ $ docker build -f Dockerfile.debug .
 This will use a file called `Dockerfile.debug` for the build instructions
 instead of `Dockerfile`.
 
+```bash
+$ curl example.com/remote/Dockerfile | docker build -f - .
+```
+
+The above command will use the current directory as the build context and read
+a Dockerfile from stdin.
+
 ```bash
 $ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug .
 $ docker build -f dockerfiles/Dockerfile.prod  -t myapp_prod .

+ 2 - 1
pkg/archive/archive_test.go

@@ -4,7 +4,6 @@ import (
 	"archive/tar"
 	"bytes"
 	"fmt"
-	"github.com/docker/docker/pkg/testutil/assert"
 	"io"
 	"io/ioutil"
 	"os"
@@ -14,6 +13,8 @@ import (
 	"strings"
 	"testing"
 	"time"
+
+	"github.com/docker/docker/pkg/testutil/assert"
 )
 
 var tmp string