diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 11b988f31a..c41f00a573 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2863,7 +2863,6 @@ _docker_image_build() { " local boolean_options=" - --compress --disable-content-trust=false --force-rm --help @@ -2872,16 +2871,35 @@ _docker_image_build() { --quiet -q --rm " + if __docker_server_is_experimental ; then options_with_args+=" --platform " boolean_options+=" --squash - --stream " fi + if [ "$DOCKER_BUILDKIT" = "1" ] ; then + options_with_args+=" + --output -o + --platform + --progress + --secret + --ssh + " + else + boolean_options+=" + --compress + " + if __docker_server_is_experimental ; then + boolean_options+=" + --stream + " + fi + fi + local all_options="$options_with_args $boolean_options" case "$prev" in @@ -2926,6 +2944,10 @@ _docker_image_build() { esac return ;; + --progress) + COMPREPLY=( $( compgen -W "auto plain tty" -- "$cur" ) ) + return + ;; --tag|-t) __docker_complete_images --repo --tag return