sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 437 forks source link

sbt docker:publishLocal logs build info as error #1554

Closed joesan closed 3 months ago

joesan commented 10 months ago

Expected behaviour

sbt docker:publishLocal builds the docker image and logs the status as info

Actual behaviour

sbt docker:publishLocal build the docker image successfully, but the logs are logged as error and that makes things confusing.


[success] All package validations passed
[error] #0 building with "default" instance using docker driver
[error] #1 [internal] load .dockerignore
[error] #1 transferring context: 2B done
[error] #1 DONE 0.0s
[error] #2 [internal] load build definition from Dockerfile
[error] #2 transferring dockerfile: 795B done
[error] #2 DONE 0.0s
[error] #3 [internal] load metadata for docker.io/library/openjdk:11
[error] #3 DONE 0.8s
[error] #4 [1/7] FROM docker.io/library/openjdk:11@sha256:99bac5bf83633e3c7399aed725c8415e7b569b54e03e4599e580fc9cdb7c21ab
[error] #4 DONE 0.0s
[error] #5 [internal] load build context
[error] #5 transferring context: 33.02kB done
[error] #5 DONE 0.0s

Information

hertg commented 9 months ago

I have the same issue after installing docker-buildx on my machine.

My current workaround for this issue is to add the --quiet flag to the docker build options. This will prevent the diagnostic output from being printed at all.

dockerBuildOptions += "--quiet"
[success] All package validations passed
[info] sha256:54d8d84c8d77ce6442d3fe6171edd77cfb974dd74dd447013b680a2cff512b1d
[info] Removing intermediate image(s) (labeled "snp-multi-stage-id=1fa46be6-0387-41d5-b1ec-67902cd00ffc") 
[info] Total reclaimed space: 0B
[info] Built image <redacted> with tags [0.28.0, latest]
[success] Total time: 21 s, completed Oct 31, 2023, 1:36:19 PM

Also see https://github.com/moby/buildkit/issues/1186