Open archenroot opened 3 years ago
I will add also my local docker file for completeness:
FROM ghcr.io/graalvm/graalvm-ce:java11-21.2.0 AS builder
RUN echo "BUILDING WITH DOCKER!!!"
RUN gu install native-image
WORKDIR /home/app
COPY classes /home/app/classes
COPY dependency/* /home/app/libs/
RUN native-image -H:Class=org.auto_accountant.fnc.save_image.Application -H:Name=application --no-fallback -cp "/home/app/libs/*:/home/app/classes/"
FROM frolvlad/alpine-glibc:alpine-3.12
RUN echo "BUILDING WITH DOCKER!!!"
RUN apk update && apk add libstdc++
COPY --from=builder /home/app/application /app/application
#COPY auto-accountant-3e24cb383cb7.json /app/
#ENV GOOGLE_APPLICATION_CREDENTIALS=/app/auto-accountant-3e24cb383cb7.json
EXPOSE 8080
ENTRYPOINT ["/app/application"]
From here on I use: ./mvnw package -Dpackaging=docker docker ps -a | grep save-image-fnc | awk '{print $1}' | xargs docker rm docker run --name save-image-fnc -p 8080:8080 save-image-fnc
NOTE: The application actually works when I call it, it creates a file at google cloud storage bucket, but prints out large amount of errors for netty. Also I don't have such errors when running only mvn package && java -jar target/save-image-fnc-version.jar
Expected Behavior
No response
Actual Behaviour
There is dozen of errors during docker run of docker-native image, sample here: java.lang.NoSuchMethodException: io.micronaut.http.netty.stream.HttpStreamsHandler$2.channelWritabilityChanged or io.micronaut.http.server.netty.RoutingInBoundHandler.channelRead etc..
all seem related to netty.stream package.
Steps To Reproduce
My class is super simple as I have everything implemented in application class to be run as cloud run function only:
This is my pom.xml
Environment Information
Gentoo x86_64 openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08) OpenJDK 64-Bit Server VM GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08, mixed mode, sharing)
Example Application
No response
Version
3.0.2