Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation: change --stream error to a warning, and update deprecated.md #2809

Merged
merged 2 commits into from
Oct 26, 2020

Commits on Oct 23, 2020

  1. 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>
    thaJeztah committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    a40beed View commit details
    Browse the repository at this point in the history
  2. Deprecation: add experimental docker build --stream option

    Docker v17.07 introduced an experimental `--stream` flag on `docker build` which
    allowed the build-context to be incrementally sent to the daemon, instead of
    unconditionally sending the whole build-context.
    
    This functionality has been reimplemented as part of BuildKit, which uses streaming
    by default and the `--stream` option will be ignored when using the classic builder,
    printing a deprecation warning instead.
    
    Users that want to use this feature are encouraged to enable BuildKit by setting
    the `DOCKER_BUILDKIT=1` environment variable or through the daemon or CLI configuration
    files.
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    7150736 View commit details
    Browse the repository at this point in the history