无法为 Flink 客户端和 Apple M1 核心构建 maven:3.6-jdk-8-slim 图像

Cant build image for maven:3.6-jdk-8-slim for Flink client and Apple M1 core

我有MacOS和m1核心的macbook air。我想开始 docker-compose with flink playground (flink 13) docker-compose link from this docs - operations playground

The docker-compose build executed with error
=> ERROR [internal] load metadata for docker.io/library/maven:3.6-jdk-8-slim                                                                                          3.6s
 => [internal] load metadata for docker.io/apache/flink:1.13.1-scala_2.12-java8                                                                                        3.3s
------
 > [internal] load metadata for docker.io/library/maven:3.6-jdk-8-slim:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:195e9c227ad891282e80602cac2372a3085ecf4ceefbb395558ffe0f7bb0b9aa: not found
ERROR: Service 'client' failed to build : Build failed

docker 文件 - Dockerfile

我也试过执行

docker pull maven:3.6-jdk-8-slim

清单列表条目中没有 linux/arm64/v8 的匹配清单

然后我尝试添加到Dockerfile FROM --platform=linux/amd64 maven:3.8-jdk-8-slim AS builder 但是有一个例外-

Type org.apache.maven.wagon.providers.http.HttpWagon$__sisu21 not present

并且我尝试将 Dockerfile 中的父映像从 maven:3.6-jdk-8-slim 更改为 maven:3.8.2-jdk-11-苗条或 maven:3.8-jdk-8-苗条。构建没问题,但在作业启动后 kafka 没有收到任何消息:命令没有显示一些东西:

我还尝试将 Flink 版本从 pull request 推荐更改为 13.2。但是没有结果。

docker-compose exec kafka kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic input 

我对 Windows 10 没有同样的问题。

Flink 社区和 Stack Overflow 上对此进行了一些讨论。参见 FLINK-22331, FLINK-13448, and Running Apache Flink 1.12 Jobs on Apple M1 Silicon. There's work being done to prepare an arm64 binary release for Flink 1.14. See the mailing list archive