UnusualAlpha / ib-gateway-docker

Docker image with IB Gateway and IBC
MIT License
235 stars 95 forks source link

Does not build when targeting Mac silicon #87

Open G1itcher opened 1 year ago

G1itcher commented 1 year ago

Describe the bug Looks like the Install4j script does not support mac sillicon. Get this error when building:

 => [setup  7/17] RUN sha256sum --check ./ibgateway-10.19.1j-standalone-linux-x64.sh.sha256                                 2.9s
 => [setup  8/17] RUN chmod a+x ./ibgateway-10.19.1j-standalone-linux-x64.sh                                                0.9s
 => ERROR [setup  9/17] RUN ./ibgateway-10.19.1j-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/10.19.1j               6.8s
------
 > [setup  9/17] RUN ./ibgateway-10.19.1j-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/10.19.1j:
#15 2.560 Unpacking JRE ...
#15 6.743 Error unpacking jar files. The architecture or bitness (32/64)
#15 6.743 of the bundled JVM might not match your machine.

To Reproduce

docker build --platform linux/arm64/v8 . -t ib-gateway-local

Expected behavior It should build

Container logs NA

Versions (please complete the following information):

Additional context If you could upload your images supported Mac silicon that would be ideal.

petercool commented 1 year ago
version: "3.4"

services:
  ib-gateway:
    restart: always
    build:
      context: ./stable
    platform: linux/x86_64 # You may force the docker compose to use assigned arch

You might try in this way for less invasive migration, recommend to keep local and prod in consistent arch