quarkus-buildpacks's People
quarkus-buildpacks's Issues
Question: Will paketo-buildpacks/java support the quarkus stacks ?
Question/Issue
Will the paketo-buildpacks/java builder support the quarkus stacks of this project or be adapted to support to build a quarkus app as OOTB the container fails to start ?
Steps to reproduce
- Build a quarkus app using pack and the paketo-buildpacks/java builder image -
pack build quarkus_app -p ./ -B paketobuildpacks/builder:base
- Start a container and check the log error reported
ERROR: failed to launch: determine start command: when there is no default process a command is required
docker run -d -p 8080:8080 -e PORT=8080 quarkus_app
bf8c5baa5a0cb41daba6229b38dbd13be6c1e362005fb7e40724df155e1ac90b
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bf8c5baa5a0c quarkus_app "/cnb/lifecycle/laun…" 24 seconds ago Exited (82) 23 seconds ago great_haibt
docker logs bf8c5baa5a0c
ERROR: failed to launch: determine start command: when there is no default process a command is required
If now, I build the quarkus app image using the image builder of this project, the container is well started and I can access the service localhost:8080
pack build quarkus_app -p ./ -B ghcr.io/halkyonio/quarkus-builder:jvm
jvm: Pulling from halkyonio/quarkus-builder
2a99c93da168: Already exists
...
[exporter] Setting default process type 'web'
[exporter] Saving quarkus_app...
[exporter] *** Images (9442916d3cbd):
[exporter] quarkus_app
[exporter] Adding cache layer 'io.quarkus.buildpacks.buildpack:m2repo'
Successfully built image quarkus_app
and
docker run -d -p 8080:8080 -e PORT=8080 quarkus_app
5cc6863a89302aa2d08c6ba8fa3425deb407b5fe0e945aa93eccb37b9dfb330a
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5cc6863a8930 quarkus_app "/cnb/process/web" 5 seconds ago Up 4 seconds 8443/tcp, 0.0.0.0:8080->8080/tcp, 8778/tcp distracted_haibt
docker logs 5cc6863a8930
INFO exec java -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp ".:target/quarkus-app/lib" -jar /layers/io.quarkus.buildpacks.buildpack/1-app/quarkus-run.jar
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-02-10 08:09:38,449 INFO [io.quarkus] (main) quarkus-petclinic 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.7.0.Final) started in 1.912s. Listening on: http://0.0.0.0:8080
2022-02-10 08:09:38,454 INFO [io.quarkus] (main) Profile prod activated.
2022-02-10 08:09:38,455 INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, hibernate-orm-panache, jdbc-h2, kubernetes, micrometer, narayana-jta, qute, resteasy, resteasy-qute, smallrye-context-propagation, vertx]
FYI: @quintesse
Support multimaven modules
As of now this buildpack detects the presence of quarkus in the root pom of the project. But there are absolutely no warranty that it will be there.
Our project looks like this :
|-- pom.xml
|-- common
| |-- pom.xml
|-- module1
| |-- pom.xml
|-- module2
| |-- pom.xml
The quarkus dependencie lies in the modules. I can build only on projet with mvan using -pl module1 -am
options, but even specifying those argument will not work here.
Is there anything that could be done ?
Maven artifact caching for native buildpack still broken
Doesn't seem to cache for some reason. Even when it's basically the same as the JVM version. Need to investigate.
Release quarkus buildpacks
I am working on a container image extension for buildpacks in quarkus (picked up @BarDweller branch).
Currently, I need these build-packs to get released in order to proceed.
Would it be possible to get a release out?
The Native build image are using java8 (should java 11) to compile the project
Adding maven to the mandrel image also installs java8 into the image and sets the default java version to 1.8. When trying to compile a Quarkus project using <maven.compiler.target>11</maven.compiler.target>
will fail to build with the following error message.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sample-app: Fatal error compiling: invalid target release: 11 -> [Help 1]
Builder Image doesn't work for Gradle Project
I was looking into buildpacks-related support for Quarkus in context of eclipse-jkube/jkube#2460
I found codejive/buildpacks-quarkus-builder:jvm
builder image which seems to generate a working container image for Quarkus projects. It generates a correct image for maven projects. However, when I configure JKube to use codejive/buildpacks-quarkus-builder:jvm
buildpack builder image it fails with this error:
k8s: jvm: Pulling from codejive/buildpacks-quarkus-builder
k8s: Digest: sha256:58aac8d364c66cc405f858228c544c3f1d50abdfc126cdbaf4e1d768fd2eb3aa
k8s: Status: Image is up to date for codejive/buildpacks-quarkus-builder:jvm
k8s: jvm: Pulling from codejive/buildpacks-quarkus-run
k8s: Digest: sha256:bafcfd82a17b9a2ce0432f8d9c127fcc0177a598c5ead8969a998217adfe3fa7
k8s: Status: Image is up to date for codejive/buildpacks-quarkus-run:jvm
k8s: 0.13.1: Pulling from buildpacksio/lifecycle
k8s: Digest: sha256:f2cb410c8e204e6d2c6d86b1a171862595d8dccefc35197804eff09ab9221219
k8s: Status: Image is up to date for buildpacksio/lifecycle:0.13.1
k8s: ===> ANALYZING
k8s: ===> DETECTING
k8s: [detector] ERROR: No buildpack groups passed detection.
k8s: [detector] ERROR: Please check that you are running against the correct path.
k8s: [detector] ERROR: failed to detect: no buildpacks participating
Here is a reproducer project https://github.com/rohankanojia-forks/quarkus-buildpacks-builder-image-reproducer for your reference. You can produce this issue using Quarkus BuildPacks extension too.
Are there any plans to support gradle? Or perhaps I'm using wrong image for gradle project? Any kind of feedback would be greatly appreciated.
Limit the native build memory in the sample app
Update the sample app to use a limit of 1.5GB build memory. This will increase the build time, but also makes sure that the build process doesn't take too much memory.
Reduce nr of buildpacks to 1?
I think it should be possible to reduce the number of buildpacks from 2 to 1. They do basically the same except for a single argument passed to mvn
and the command that gets executed by the final runner image.
The way I see it in the build
we could detect if native-image
is available on the path and if so do native compilation. If not we just do normal compilation.
But perhaps we can even make it an option somehow, that way we could even reduce the number of stacks.
Remove dnf install maven from JVM stack
The UBI8 java image already includes the maven package so we should remove dnf install maven
from the JVM stack
Simplify `build` script when run-java gets improved
When (if) this PR gets merged we can simplify the build
script somewhat: jboss-container-images/openjdk#207
bash script fails on macos as realpath command is not found
Issue
The bash script /build-stack.sh
fails on macos as realpath command is not found
./create-buildpacks.sh
---> Building Stacks
---> Building Stack native
/stacks/build-stack.sh: line 50: realpath: command not found
Build of the apps/quarkus-sample-app fails
Issue
The build of the apps/quarkus-sample-app
project fails using quarkus-jvm
stack
===> DETECTING
io.quarkus.buildpacks.buildpack 0.0.1
===> ANALYZING
Previous image with name "quarkus-app" not found
===> RESTORING
===> BUILDING
---> Quarkus Buildpack
Building /workspace :: Native? 0
Maven transfer progress disabled.
Building using mvn package -B --no-transfer-progress -DskipTests
/usr/bin/mvn: line 98: which: command not found
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
Command executed within the project
pack build quarkus-app --path apps/quarkus-sample-app --builder redhat/buildpacks-builder-quarkus-jvm:latest
Additional information
[snowdrop@h01-121 quarkus-buildpacks]$ docker run --rm -it redhat/buildpacks-builder-quarkus-jvm:latest bash
[jboss@bf397dc271d3 layers]$ ls -la /usr/bin
total 17000
dr-xr-xr-x 1 root root 4096 Aug 10 14:56 .
drwxrwxr-x 1 jboss root 4096 Aug 10 14:51 ..
-r-xr-xr-x 1 root root 48 Apr 14 2020 '['
-rwxr-xr-x 1 root root 29 Apr 21 14:07 alias
lrwxrwxrwx 1 root root 26 Aug 10 14:53 alt-java -> /etc/alternatives/alt-java
-r-xr-xr-x 1 root root 51 Apr 14 2020 arch
-rwxr-xr-x 1 root root 33640 Feb 1 2021 aserver
lrwxrwxrwx 1 root root 4 Dec 3 2020 awk -> gawk
-r-xr-xr-x 1 root root 52 Apr 14 2020 b2sum
-r-xr-xr-x 1 root root 53 Apr 14 2020 base32
-r-xr-xr-x 1 root root 53 Apr 14 2020 base64
-r-xr-xr-x 1 root root 55 Apr 14 2020 basename
-rwxr-xr-x 1 root root 1150584 Apr 21 14:07 bash
lrwxrwxrwx 1 root root 10 Apr 21 14:07 bashbug -> bashbug-64
...
-rwxr-xr-x 1 root root 28 Apr 21 14:07 wait
-rwxr-xr-x 1 root root 16936 May 4 2020 watchgnupg
-r-xr-xr-x 1 root root 49 Apr 14 2020 wc
-r-xr-xr-x 1 root root 50 Apr 14 2020 who
-r-xr-xr-x 1 root root 53 Apr 14 2020 whoami
-rwxr-xr-x 1 root root 246 Aug 24 2018 withsctp
-rwxr-xr-x 1 root root 424 Aug 12 2018 x86_64-redhat-linux-gnu-pkg-config
-rwxr-xr-x 1 root root 90320 Nov 5 2018 xargs
...
[jboss@bf397dc271d3 layers]$ ls -la /etc/alternatives/mvn
lrwxrwxrwx 1 root root 24 Aug 10 14:55 /etc/alternatives/mvn -> /usr/share/maven/bin/mvn
[jboss@bf397dc271d3 layers]$ ls -la /usr/share/maven/bin/mvn
-rwxr-xr-x 1 root root 5846 Dec 24 2020 /usr/share/maven/bin/mvn
/usr/bin/sh: rsync: command not found
I've got a Quarkus project for which I am trying to build a native image. The project includes a React client which is failing with the above error.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.