Skip to content

Commit 947b176

Browse files
authored
fix: pin platform: linux/amd64 for hasadna-published images (#13)
All ghcr.io/hasadna/* images are only published for linux/amd64 (no arm64 manifest). On arm64 hosts (e.g. Apple Silicon) `docker-compose pull stride-db-init` fails with "no matching manifest for linux/arm64/v8 in the manifest list entries", since Docker refuses to resolve a platform for a multi-arch manifest list with no matching entry, unlike single-arch images where it just warns and emulates. Pin platform: linux/amd64 via a shared YAML anchor on each service using a ghcr.io/hasadna image, so this works out of the box for any user regardless of host architecture - no DOCKER_DEFAULT_PLATFORM env var needed. postgres/redis are left untouched since they're already genuinely multi-arch and would otherwise be forced into unnecessary emulation. Verified: removed all cached images and DOCKER_DEFAULT_PLATFORM, then confirmed `docker-compose pull stride-db-init` succeeds using only this compose-file change.
1 parent 328e5c8 commit 947b176

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docker-compose.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
version: '2.4'
22

3+
# All ghcr.io/hasadna/* images are only published for linux/amd64. Pinning it
4+
# here (rather than relying on each user setting DOCKER_DEFAULT_PLATFORM)
5+
# makes pull/run work out of the box on arm64 hosts (e.g. Apple Silicon, via
6+
# Docker Desktop's bundled Rosetta/QEMU emulation) without forcing emulation
7+
# on the images below that are genuinely multi-arch (postgres, redis).
8+
# Native Linux arm64 hosts need QEMU binfmt registered once, e.g.:
9+
# docker run --privileged --rm tonistiigi/binfmt --install all
10+
x-amd64-only: &amd64-only
11+
platform: linux/amd64
12+
313
services:
414

515
stride-db-init:
16+
<<: *amd64-only
617
image: ghcr.io/hasadna/open-bus-stride-db/open-bus-stride-db:latest
718
restart: "on-failure"
819
environment:
@@ -28,6 +39,7 @@ services:
2839
- "stride-db:/var/lib/postgresql/data"
2940

3041
stride-etl:
42+
<<: *amd64-only
3143
image: ghcr.io/hasadna/open-bus-stride-etl/open-bus-stride-etl:latest
3244
restart: "no"
3345
environment:
@@ -36,6 +48,7 @@ services:
3648
- stride-db
3749

3850
gtfs-etl:
51+
<<: *amd64-only
3952
image: ghcr.io/hasadna/open-bus-gtfs-etl/open-bus-gtfs-etl:latest
4053
restart: "no"
4154
environment:
@@ -47,6 +60,7 @@ services:
4760
- "gtfs-storage:/var/gtfs-storage"
4861

4962
siri-requester:
63+
<<: *amd64-only
5064
image: ghcr.io/hasadna/open-bus-siri-requester/open-bus-siri-requester:latest
5165
restart: unless-stopped
5266
environment:
@@ -63,6 +77,7 @@ services:
6377
- ".data/siri-requester-key:/var/siri-requester-key"
6478

6579
siri-requester-health:
80+
<<: *amd64-only
6681
image: ghcr.io/hasadna/open-bus-siri-requester/open-bus-siri-requester:latest
6782
restart: unless-stopped
6883
entrypoint: [open-bus-siri-requester, health-daemon-start]
@@ -72,6 +87,7 @@ services:
7287
- "siri-storage:/var/siri-storage"
7388

7489
siri-requester-nginx:
90+
<<: *amd64-only
7591
image: ghcr.io/hasadna/open-bus-siri-requester/open-bus-siri-requester-nginx:latest
7692
restart: unless-stopped
7793
ports:
@@ -84,6 +100,7 @@ services:
84100
- siri-requester-health
85101

86102
siri-etl-process-new-snapshots:
103+
<<: *amd64-only
87104
image: ghcr.io/hasadna/open-bus-siri-etl/open-bus-siri-etl:latest
88105
restart: unless-stopped
89106
command: [start-process-new-snapshots-daemon]
@@ -97,6 +114,7 @@ services:
97114
- stride-db
98115

99116
stride-api:
117+
<<: *amd64-only
100118
image: ghcr.io/hasadna/open-bus-stride-api/open-bus-stride-api:latest
101119
restart: unless-stopped
102120
ports:
@@ -117,6 +135,7 @@ services:
117135
- "5433:5432"
118136

119137
airflow-webserver:
138+
<<: *amd64-only
120139
image: ghcr.io/hasadna/open-bus-pipelines/open-bus-pipelines:latest
121140
restart: unless-stopped
122141
build: .
@@ -133,6 +152,7 @@ services:
133152
- redis
134153

135154
airflow-scheduler:
155+
<<: *amd64-only
136156
image: ghcr.io/hasadna/open-bus-pipelines/open-bus-pipelines:latest
137157
restart: unless-stopped
138158
build: .

0 commit comments

Comments
 (0)