刚开始夸克-芯棒到多级对接构建一个夸克-恢复实例。Mac M1 pro - macOS蒙特利-8 6cpu和32 VM内存码头桌面-VM-6 6cpu内存16 VM
FROM quay.io/quarkus/ubi-quarkus-mandrel:21.3-java11 AS build
USER root
COPY --chown=quarkus:quarkus mvnw /code/mvnw
COPY --chown=quarkus:quarkus .mvn /code/.mvn
COPY --chown=quarkus:quarkus pom.xml /code/
USER quarkus
WORKDIR /code
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
COPY src /code/src
RUN ./mvnw package -Pnative -Dquarkus.native.native-image-xmx=14g -Drelease.version=1.0
## Stage 2 : create the docker final image
FROM quay.io/quarkus/quarkus-micro-image:1.0
WORKDIR /work/
COPY --from=build /code/target/*-runner /work/application
# set up permissions for user `1001`
RUN chmod 775 /work /work/application \
&& chown -R 1001 /work \
&& chmod -R "g+rwX" /work \
&& chown -R 1001:root /work
EXPOSE 9080
USER 1001
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]码头建设
docker build -f src/main/docker/Dockerfile.multistage -t epp .建筑卡在
=> [build 10/10] RUN ./mvnw package -Pnative -Dquarkus.native.native-image-xmx=14g -Drelease.version=1.0 3184.7s
=> => # [INFO] Building jar: /code/target/enterpiseplanprofile-1.0.0-SNAPSHOT.jar
=> => # [INFO]
=> => # [INFO] --- quarkus-maven-plugin:2.8.1.Final:build (default) @ enterpiseplanprofile ---
=> => # [WARNING] [io.quarkus.config] Unrecognized configuration key "quarkus.hibernate-orm.database.generation" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
=> => # [INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /code/target/enterpiseplanprofile-1.0.0-SNAPSHOT-native-image-source-jar/enterpiseplanprofile-1.0.0-SNAPSHOT-runner.jar
=> => # [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /code/target/enterpiseplanprofile-1.0.0-SNAPSHOT-native-image-source-jar/enterpiseplanprofile-1.0.0-SNAPSHOT-runner.jar感谢你的指导。
谢谢拉杰
发布于 2022-04-25 10:30:02
更新21.9:https://github.com/quarkusio/quarkus-images/issues/83中的工作已经完成,多拱图像现在可以使用了.
最初的答案是:,本地的图像构建器映像目前只有x86,而在M1上对x86的仿真看起来非常慢。
我简要地尝试引导一个多弓的registry.access.redhat.com/ubi8映像,并且能够模拟构建器映像将执行的命令(假设安装了正确的aarch64依赖项)。我能够在没有任何问题的情况下构建本机可执行文件。
我们正在努力提供建造者图像的多拱版本,但我们还没有实现。
https://stackoverflow.com/questions/71981922
复制相似问题