简体   繁体   English

Java Docker 申请

[英]Issue with Building Java Application in Docker

I am at the Java Directory.我在 Java 目录中。 And When I execute the build command: docker build -t karthikjohnbabu/hello-world-java:0.0.2.RELEASE.当我执行构建命令时:docker build -t karthikjohnbabu/hello-world-java:0.0.2.RELEASE。

I get the below error message.我收到以下错误消息。 Please help me???请帮我???

failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:195e9c227ad891282e80602cac2372a3085ecf4ceefbb395558ffe0f7bb0b9aa: not found.无法使用前端 dockerfile.v0 解决:无法创建 LLB 定义:清单 sha256:195e9c227ad891282e80602cac2372a3085ecf4ceefbb395558ffe0f7bb0b9aa 中的平台不匹配:未找到。

Complete details of error below:以下错误的完整详细信息:

Try adding the following arg to the command:尝试将以下 arg 添加到命令中:

   --platform=linux/amd64

or alternatively use the following command to set an env var:或者使用以下命令设置环境变量:

   export DOCKER_DEFAULT_PLATFORM=linux/amd64

The information you gave leaves room for guessing.您提供的信息留下了猜测的空间。

I believe the important part is no match for platform in manifest .我相信重要的部分no match for platform in manifest Thus I believe in your dockerfile you start FROM someimage , and this someimage is not available for the platform you are using (which could mean MacOS).因此,我相信你的 dockerfile 你是FROM someimage开始的,而这个 someimage 不适用于你正在使用的平台(这可能意味着 MacOS)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM