Can't build entando-k8s-keycloak-controller

I’m trying to build a custom docker image of the entando-k8s-keycloak-controller to use it with a custom helm chart.
I build the project with

mvn install

and I try to assemble docker image with

docker build -f Dockerfile.jvm -t h2-kc-server-controller .

This log is printed:

Sending build context to Docker daemon  1.191MB
Step 1/6 : FROM fabric8/java-alpine-openjdk8-jre
 ---> 6aae0814dea5
Step 2/6 : ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
 ---> Using cache
 ---> b8a9e9446067
Step 3/6 : ENV AB_ENABLED=jmx_exporter
 ---> Using cache
 ---> daf63b593d94
Step 4/6 : COPY target/lib/* /deployments/lib/
COPY failed: no source files were specified

Checking the project I can see that target/lib folder is not generated by maven.

How can I solve this issue?

1 Like

Try packaging explicitly in the maven command:

mvn clean package -Pjvm
docker build . -f Dockerfile.jvm -t entando/entando-k8s-xyz-controller:6.1.x h2-kc-server-controller
1 Like