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

Time:10-01

I have Mac OS and macbook air with m1 core. I want to start 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

The docker file - Dockerfile

Also I tried to execute

docker pull maven:3.6-jdk-8-slim

no matching manifest for linux/arm64/v8 in the manifest list entries

Then I tried to add to Dockerfile FROM --platform=linux/amd64 maven:3.8-jdk-8-slim AS builder But there is an exception -

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

And I tried to change the parent image in Dockerfile from maven:3.6-jdk-8-slim to maven:3.8.2-jdk-11-slim or maven:3.8-jdk-8-slim. Build is OK, but after job starting kafka does not receive any message: the command did not show something:

Also I tried to change Flink version to 13.2 from pull request recommendation. But there is no result.

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

I do not have the same problem with Windows 10.

CodePudding user response:

There has been some discussion of this in the Flink community, and on Stack Overflow. See 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.

  • Related