From 71b0f91129039020576f94958af1fa3a88b5e718 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 10 Apr 2017 16:47:41 -0400 Subject: [PATCH] Add docs for reading Dockerfile from stdin. Signed-off-by: Daniel Nephin --- docs/reference/commandline/build.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 4f5d3c1a37..5d34beca76 100644 --- a/docs/reference/commandline/build.md +++ b/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 .