2

我有一个可以在我的本地环境中正常运行的 Micronaut 应用程序。我现在正在尝试为它构建 Docker 映像。

D:\project\student-custom-runtime> docker build . -t student-custom-runtime

构建失败并出现以下错误:

Error: Main entry point class 'io.micronaut.function.aws.runtime.MicronautLambdaRuntime' not found.

但是,我检查了我的项目的项目和外部依赖项是否有micronaut-function-aws-custom-runtimejar

这是build-native-image.sh文件:

${GRAALVM_HOME}/bin/native-image --no-server \
             --class-path student-custom-runtime-*.jar \
             -H:ReflectionConfigurationFiles=src/main/resources/reflect.json \
             -H:EnableURLProtocols=http \
             -H:IncludeResources="logback.xml|application.properties|.*/endpoints.json$" \
             -H:Log=registerResource \
             -H:DynamicProxyConfigurationFiles="dynamic-proxies.json" \
             -H:Name=server \
             -H:Class=io.micronaut.function.aws.runtime.MicronautLambdaRuntime \
             -H:+ReportUnsupportedElementsAtRuntime \
             -H:-AllowVMInspection \

堆栈跟踪:

com.oracle.svm.core.util.UserError$UserException: Main entry point class 'io.micronaut.function.aws.runtime.MicronautLambdaRuntime' not found.
        at com.oracle.svm.core.util.UserError.abort(UserError.java:65)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:240)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:422)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:108)
Error: Image build request failed with exit status 1

我不确定是什么导致了这个错误。任何帮助表示赞赏!

4

0 回答 0