kamal icon indicating copy to clipboard operation
kamal copied to clipboard

Docker pull fails trying to pull arm64 image on amd64 accessories server

Open hmontazeri opened this issue 1 year ago • 1 comments

I'm encountering a weird problem since I upgraded to Kamal 2.x. My deployment fails on pulling app image on the redis server (10.0.0.4) which doesn't have an amd64 image as app servers are all arm64.

Config:

service: eventsync-web
image: hmontazeri/xxxx
servers:
  web:
    hosts:
      - 10.0.0.1
      - 10.0.0.2

registry:
  server: xxx
  username: xxx
  password:
    - XXX

env:
  clear:
    DATABASE_URL: postgresql://xxx
    RAILS_ENV: production
    PORT: 3000
    REDIS_URL: redis://10.0.0.4:6379/0
  secret:
    - RAILS_MASTER_KEY
    - 
builder:
  arch:
    - arm64

accessories:
  db:
    service: postgres
    image: postgres:16
    host: 10.0.0.3
    port: 5432
    env:
      clear:
        POSTGRES_USER: xxx
        POSTGRES_PASSWORD: xxx
        POSTGRES_DB: xxx
    directories:
      - data:/var/lib/postgresql/data
  redis:
    service: redis
    image: redis:7.0
    host: 10.0.0.4
    port: 6379
    directories:
      - data:/data

proxy:
  app_port: 3000

Servers: 10.0.0.1-10.0.0.3 are arm64 10.0.0.4 is amd64 (no arm64 image)

kamal config lists

kamal config outputs :

:roles:
- web
:hosts:
- 10.0.0.1
- 10.0.0.2
- 10.0.0.3
- 10.0.0.4
....

Is it me or is this a bug?

hmontazeri avatar Oct 23 '24 09:10 hmontazeri

For me it happens on setup Looks like it tries to deploy the app to a server not listed in servers section, which should not happen

Temp. workaround:

kamal setup -r web

a3kov avatar Oct 26 '24 23:10 a3kov

Fixed by https://github.com/basecamp/kamal/pull/1508

djmb avatar Apr 18 '25 12:04 djmb