snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

UPX compression used together with jib not working correctly #462

Closed snowdrop-bot closed 2 years ago

snowdrop-bot commented 2 years ago

Describe the bug

When building an native docker image with jib enabling UPX, the binary is compressed after the image is build and pushed. So the pushed container still uses the uncompressed version of the runner.

Expected behavior

The binary is first compressed and then the image is created, so that the binary in the image is the compressed one

Actual behavior

Visible in the log, the message about the image digest occurs before the log about the compression

[mqtt-authorization-server-unspecified-runner:62]     (inline):  15,917.25 ms,  4.76 GB
[mqtt-authorization-server-unspecified-runner:62]    (compile):  53,329.92 ms,  5.11 GB
[mqtt-authorization-server-unspecified-runner:62]      compile:  92,045.23 ms,  4.91 GB
[mqtt-authorization-server-unspecified-runner:62]        image:  11,680.85 ms,  5.02 GB
[mqtt-authorization-server-unspecified-runner:62]        write:   2,805.42 ms,  5.02 GB
[mqtt-authorization-server-unspecified-runner:62]      [total]: 251,420.95 ms,  5.02 GB
# Printing build artifacts to: /project/mqtt-authorization-server-unspecified-runner.build_artifacts.txt
Base image 'quay.io/quarkus/quarkus-micro-image:1.0' does not use a specific image digest - build may not be reproducible
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2020
UPX 3.96        Markus Oberhumer, Laszlo Molnar & John Reiser   Jan 23rd 2020

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
 127902824 ->  32507128   25.42%   linux/amd64   mqtt-authorization-server-unspecified-runner

Packed 1 file.

BUILD SUCCESSFUL in 8m 39s
5 actionable tasks: 3 executed, 2 up-to-date

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

17.0.1

GraalVM version (if different from Java)

quay.io/quarkus/ubi-quarkus-mandrel:21.3-java17

Quarkus version or git rev

2.6.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 7.3.1

Additional information

No response


https://github.com/quarkusio/quarkus/issues/22110


$upstream:22110$