Search code examples
linuxdockermacosapple-m1

docker .. exec: "--platform=linux/arm64": stat --platform=linux/arm64: no such file or directory: unknown


After a weekend running docker start failing

docker run -it -p 9095:9095 tp-service-java-arm64 --platform=linux/arm64

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--platform=linux/arm64": stat --platform=linux/arm64: no such file or directory: unknown.

This is mac with M1 CPU


Solution

  • OK, running now as

    docker run -it --platform=linux/arm64 -p 9095:9095 tp-service-java-arm64
    
    

    I have to build special image for arm64 and run it this way, as alternative Intel/amd64 fails to run on M1 mac.