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
There has been this thing with AWT extension (that enables numerous document processing extensions such as Tika, POI, or general PDF or image processing integrations) where you had to copy not only the runner executable, but also all the .so files libraries the build generated, i.e. there are more artifacts then the single native executable.
It sounds trivial, but as usual, the topic has wide spread tentacles. See these cases:
edit Dockerfile.native to add a line that copies *.so files and *.properties:
# Shared objects to be dynamically loaded at runtime as needed,
COPY --chown=1001:root target/*.properties target/*.so /work/
That way, some file is always copied over, admittedly superfluously, and it is quarkus-artifact.properties. If the build produced *.so files, those are coped over too. Note that creating a micro image is slightly more demanding.
I poked around it and it is not entirely clear to me how to test it, where it is actually used.
My usual workflow I know is quarkus-container-image-docker and adding -Dquarkus.native.container-build=true, -Dquarkus.container-image.build=true, but that requires user to already have src/main/docker/Dockerfile.native in the project, so no devtools/codestarts templace comes to play.
Description
There has been this thing with AWT extension (that enables numerous document processing extensions such as Tika, POI, or general PDF or image processing integrations) where you had to copy not only the runner executable, but also all the .so files libraries the build generated, i.e. there are more artifacts then the single native executable.
It sounds trivial, but as usual, the topic has wide spread tentacles. See these cases:
As noted in an old discussion on the topic, trying to
COPY
an empty set of artifacts results in a container build error, both with Podman and Docker.A way around this I have been using in awt-graphics-rest-quickstart is:
.dockerignore
to add:Dockerfile.native
to add a line that copies*.so
files and*.properties
:That way, some file is always copied over, admittedly superfluously, and it is
quarkus-artifact.properties
. If the build produced*.so
files, those are coped over too. Note that creating a micro image is slightly more demanding.Tackling case 4.: runtime image
@gsmet suggested that our default template in Dockerfile.tpl.qute.native could be adjusted to deal with copying
*.so
files.Question
I poked around it and it is not entirely clear to me how to test it, where it is actually used.
My usual workflow I know is
quarkus-container-image-docker
and adding-Dquarkus.native.container-build=true
,-Dquarkus.container-image.build=true
, but that requires user to already havesrc/main/docker/Dockerfile.native
in the project, so no devtools/codestarts templace comes to play.Does JIB use the template? Buildpack?
Implementation ideas
Edit template in Dockerfile.tpl.qute.native, according to what is described above.
The text was updated successfully, but these errors were encountered: