Docker Portainer exec /bin/sh: exec format error on raspi5

Hi,
I copied the docker-compose-cockroach.yml in my docker portainer instance on my pi5 and the Logs show me “exec /bin/sh: exec format error”
CockroachDB and Prometheus are running fine, only nakama gets the exec error.
executing the compose file without portainer leads to teh same issue
Any Idea?

Hi @Moonstone,

Those files are somewhat outdated, we’re currently revamping that page to bring it up to date.

I think the issue is that the RPI is ARM architecture, but we didn’t provide cross-platform Docker images correctly up until Nakama v3.26.0+ (IIRC).

I’d suggest you use this instead:

services:
  cockroachdb:
    image: cockroachdb/cockroach:latest-v26.1
    command: start-single-node --insecure --store=attrs=ssd,path=/var/lib/cockroach/
    restart: "no"
    volumes:
      - data:/var/lib/cockroach
    expose:
      - "8080"
      - "26257"
    ports:
      - "26257:26257"
      - "8080:8080"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
      interval: 3s
      timeout: 3s
      retries: 5
  nakama:
    image: registry.heroiclabs.com/heroiclabs/nakama:3.38.0
    entrypoint:
      - "/bin/sh"
      - "-ecx"
      - >
        /nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
        exec /nakama/nakama --name nakama1 --database.address root@cockroachdb:26257 --logger.level DEBUG --session.token_expiry_sec 7200        
    restart: "no"
    links:
      - "cockroachdb:db"
    depends_on:
      cockroachdb:
        condition: service_healthy
    volumes:
      - ./:/nakama/data
    expose:
      - "7349"
      - "7350"
      - "7351"
      - "9100"
    ports:
      - "7349:7349"
      - "7350:7350"
      - "7351:7351"
    healthcheck:
      test: ["CMD", "/nakama/nakama", "healthcheck"]
      interval: 10s
      timeout: 5s
      retries: 5
volumes:
  data:

I simplified it a bit by removing the prometheus service, you can copy that back in if you need it (remember to add back the appropriate --config flag if you do).

Thank you so much! After I removed the depends_on prometheus, everything is working now and I can start my project :slight_smile:

Good catch, I’ve updated the file above. Happy building! :video_game: