Skip to content

Commit 2e23b70

Browse files
authored
Merge pull request #53 from OpenConext/bugfix/mongo-on-apple-silicon
Fix illegal instruction when starting mongo container on Apple Silicon in Docker desktop
2 parents e656566 + 0737275 commit 2e23b70

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

core/docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ services:
5959
MONGODB_REPLICA_SET_MODE: primary
6060
MONGODB_REPLICA_SET_KEY: secretsecret
6161
MONGODB_ADVERTISED_HOSTNAME: mongodb
62+
# Force QEMU emulation instead of Rosetta for x86_64 Apple Silicon Macs.
63+
# Rosetta does not support AVX instructions, which this MongoD image requires, causing an
64+
# "Illegal instruction" error when starting the container:
65+
# /opt/bitnami/scripts/libos.sh: line 346: 50 Illegal instruction "$@" > /dev/null 2>&1
66+
EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU: 1
6267
volumes:
6368
- ./mongo/:/docker-entrypoint-initdb.d/
6469
- openconext_mongodb:/bitnami/mongodb

0 commit comments

Comments
 (0)