Docker has an issue with Apple M1 Silicon: I am no...
# troubleshooting
a
Docker has an issue with Apple M1 Silicon: I am not able to run this command: docker-compose -up and get this error: broker The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
m
The Flink community doesn’t provide a Docker image for this platform; you could chose to emulate via the —platform tag
I do thought that https://hub.docker.com/_/flink/tags does offer them
a
What do you mean by platform? I am running the sample docker from your website:
Copy code
version: "2.2"
services:
  jobmanager:
    image: flink:latest
    ports:
      - "8081:8081"
    command: standalone-job --job-classname com.job.ClassName [--job-id <job id>] [--fromSavepoint /path/to/savepoint [--allowNonRestoredState]] [job arguments]
    volumes:
      - /host/path/to/job/artifacts:/opt/flink/usrlib
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
        parallelism.default: 2        

  taskmanager:
    image: flink:latest
    depends_on:
      - jobmanager
    command: taskmanager
    scale: 1
    volumes:
      - /host/path/to/job/artifacts:/opt/flink/usrlib
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
        taskmanager.numberOfTaskSlots: 2
        parallelism.default: 2
m
a
If you mean this command:
docker build --platform linux/amd64 -t empad .
I get this error: [+] Building 0.0s (1/2) => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2B 0.0s failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount886151279/Dockerfile: no such file or directory
I also tried (from stackoverflow)
Copy code
# useful only for Mac OS Silicon M1, 
# still working but useless for the other platforms
docker() {
 if [[ `uname -m` == "arm64" ]] && [[ "$1" == "run" || "$1" == "build" ]]; then
    /usr/local/bin/docker "$1" --platform linux/amd64 "${@:2}"
  else
     /usr/local/bin/docker "$@"
  fi
}
but jobmanager is not working:
Problem SOLVLED: rebooted laptop.