mirror of https://github.com/docker/cli.git
builder: print deprecation warning instead of failing for --stream
While performance will be worse, we can safely ignore the --stream option when used, and print a deprecation warning instead of failing the build. With this patch: echo -e "FROM scratch\nLABEL foo=bar" | docker build --stream - DEPRECATED: The experimental --stream flag has been removed and the build context will be sent non-streaming. Enable BuildKit instead with DOCKER_BUILDKIT=1 to stream build context, see https://docs.docker.com/go/buildkit/ Sending build context to Docker daemon 2.048kB Step 1/2 : FROM scratch ---> Step 2/2 : LABEL foo=bar ---> Running in 99e4021085b6 Removing intermediate container 99e4021085b6 ---> 1a7a41be241f Successfully built 1a7a41be241f Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
064148042d
commit
a40beedcc3
|
@ -246,7 +246,11 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
|
||||||
)
|
)
|
||||||
|
|
||||||
if options.stream {
|
if options.stream {
|
||||||
return errors.New("Experimental flag --stream was removed, enable BuildKit instead with DOCKER_BUILDKIT=1")
|
_, _ = fmt.Fprint(dockerCli.Err(), `DEPRECATED: The experimental --stream flag has been removed and the build context
|
||||||
|
will be sent non-streaming. Enable BuildKit instead with DOCKER_BUILDKIT=1
|
||||||
|
to stream build context, see https://docs.docker.com/go/buildkit/
|
||||||
|
|
||||||
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.dockerfileFromStdin() {
|
if options.dockerfileFromStdin() {
|
||||||
|
|
Loading…
Reference in New Issue