(as commented by @BarakBD-Globality in moby/moby#36655 (comment))
The docker push --quiet option was implemented in #2197 (not in a release yet), but appears to not print errors and returns a zero exit code on failure;
Without --quiet
$ docker push nosuchimage
The push refers to repository [docker.io/library/nosuchimage]
An image does not exist locally with the tag: nosuchimage
echo $?
1
$ docker push busybox
The push refers to repository [docker.io/library/busybox]
195be5f8be1d: Layer already exists
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.io registry NOW to avoid future disruption. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
errors:
denied: requested access to the resource is denied
unauthorized: authentication required
echo $?
1
With --quiet:
$ docker push --quiet nosuchimage
docker.io/library/nosuchimage
$ echo $?
0
$ docker push --quiet busybox
docker.io/library/busybox
$ echo $?
0
(as commented by @BarakBD-Globality in moby/moby#36655 (comment))
The
docker push --quietoption was implemented in #2197 (not in a release yet), but appears to not print errors and returns azeroexit code on failure;Without
--quietWith
--quiet: