Add support for compressing build context during image build

When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
This commit is contained in:
Paul Kehrer
2017-06-02 00:10:12 +00:00
committed by Tibor Vass
parent 454f365dfe
commit 9c85295b1c
4 changed files with 8 additions and 1 deletions
+4
View File
@@ -16,6 +16,7 @@ docker-build - Build a new image from the source code at PATH
[**--label**[=*[]*]]
[**--no-cache**]
[**--pull**]
[**--compress**]
[**-q**|**--quiet**]
[**--rm**[=*true*]]
[**-t**|**--tag**[=*[]*]]
@@ -84,6 +85,9 @@ set as the **URL**, the repository is cloned locally and then sent as the contex
**--pull**=*true*|*false*
Always attempt to pull a newer version of the image. The default is *false*.
**--compress**=*true*|*false*
Compress the build context using gzip. The default is *false*.
**-q**, **--quiet**=*true*|*false*
Suppress the build output and print image ID on success. The default is *false*.