You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _versions/main/guides/upx.adoc
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,13 +25,30 @@ Note that UPX compression:
25
25
The UPX compression requires:
26
26
27
27
* the `upx` command to be available in the system `PATH`;
28
+
* an explicitly defined `quarkus.native.compression.container-image`;
28
29
* or to have built the native executable using an in-container build.
29
30
31
+
If `quarkus.native.compression.container-image` is not set explicitly, it will implicitly default to `quarkus.native.builder-image`.
32
+
30
33
If you have the `upx` command available on your path, Quarkus uses it.
31
-
Otherwise, if you built the native image using an in-container build (using `quarkus.native.container-build=true`) and if the builder image provides the `upx` command, Quarkus compresses the executable from inside the container.
34
+
Otherwise, if you built the native image using an in-container build (using `quarkus.native.container-build=true`) and if the compression image provides the `upx` command, Quarkus compresses the executable from inside the container.
35
+
36
+
If you want to force compression to take place in a container, you can set `quarkus.native.compression.container-build` to `true` (or `false` to explicitly not run compression in a container).
32
37
33
38
If you are not in one of these cases, the compression fails.
34
39
40
+
Setting `quarkus.native.compression.container-image` results in the compression to run in a container.
41
+
If you want to set the variable, but not run the compression in a container, set `quakrus.native.compression.container-build` explicitly to `false`.
42
+
43
+
[IMPORTANT]
44
+
.`WORKDIR` for the image used for compression
45
+
====
46
+
The executable to compress is mounted in directory `/project`.
47
+
Since the container runs `upx` in the current working directory, the `WORKDIR` of the image used for compression must be `/project`.
48
+
====
49
+
50
+
Compression can be explicitly en-/disabled by setting `quarkus.native.compression.enabled`.
0 commit comments