-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bitnami/mongodb] Mongodb doesn't run on M1 Mac #40947
Comments
I was just going to open this exact ticket myself. mongo:5.0 arm64 image runs fine on m1/m2 for example. @javsalgar is there any way I can help? I was looking at the existing workflows thinking about opening a pr, but doesn't seem like the build/release part of the automation is on github. Having this fixed would be quite valuable for us at @RocketChat |
Found these bitnami/charts#7305 bitnami/charts#7305 (comment) |
Hi! I'm afraid we currently don't have support for Debian 11 ARM. As soon as we add support for this, we will notify the community |
We have been using this unofficial mirror of |
Cheers for this! exactly what I needed today! |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
// not stale. |
We're using Apple Silicon as well and rather not rely on a workaround but stay with the Bitnami implementation (as we're using RocketChat and RocketChat suggests to use the Bitnami MongoDB image). Therefor I wonder; does anyone have an update or estimation on this issue? Apple Silicon is out for a rather long time and here to stay I think. Is this issue deemed fixable and on a road map, or would it be best for us to plan under the assumption it won't be fixed in any foreseeable future? |
At this moment there is not a bitnami/mongodb multiarch image available. Having said that, we have an internal task still on our backlog to revisit the unsupported apps. We'll update this thread once done the mentioned task |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
// not stale |
This PR adds a Helm chart for MongoDB, supporting both standalone mode and sharded cluster mode. Shard rules, including shard keys, shard methods, and unique constraints, are defined and managed in the values.yaml. This chart depends on Bitnami's mongodb-sharded chart (https://github.com/bitnami/charts/tree/main/bitnami/mongodb-sharded). There are a few known issues with it: A problem with livenessProbe and readinessProbe - Issues: bitnami/charts#21957 - Solution: use custom livenessProbe and readinessProbe instead Lack of ARM64 support in the Bitnami mongodb-sharded container - Issues: - bitnami/charts#7305 (comment) - bitnami/containers#40947 - Solution: use the official Mongo 6.0 image instead and set up the cluster via a Job. --------- Co-authored-by: Youngteac Hong <[email protected]>
Same problem 🥲 |
Working on an M1 after upgrading to Docker Desktop 4.27.1 (Docker Engine 25.0.2) and enabling the EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU environment variable. Example: |
@borodiliz hey, I am new to this, could you tell me how can I enable the variable in a docker compose based project? |
@DarhkVoyd Sure. Same as other environment variables. Here is a complete example: version: "3.8"
services:
mongo:
image: bitnami/mongodb:5.0
environment:
- MONGODB_ADVERTISED_HOSTNAME=127.0.0.1
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_ROOT_USER=elon
- MONGODB_ROOT_PASSWORD=supersecret
- MONGODB_REPLICA_SET_KEY=foobar123
- EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU=1 # This is required on Apple Silicon https://github.com/docker/for-mac/issues/6620
ports:
- "27017:27017"
volumes:
- "mongo-db:/bitnami/mongodb"
volumes:
mongo-db: |
Finally!! It worked, thank you so much you are life saver. I wasted my entire week on this error. |
Thanks @borodiliz! EDIT: Please use this for local development ONLY!!! For those using Helm, you can include this in the values file:
|
Guys, quemu emulation workaround is not suitable for Kubernetes use and not suitable for Production environments at all. |
The workaround for local development works 🎉 . However I had to turnoff rosetta acceleration in Docker Desktop settings (Apple virtualization and virtIO can be enabled). |
In my docker compose, it worked when I explicitly set services:
mongo:
platform: linux/amd64
image: bitnami/mongodb:7.0.14
environment:
- EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU=1 |
Ran into same issue on Mac intel i7
|
I was able to get
Thank you @borodiliz, @RezaOwliaei, @arnoldpistorius, and everyone for posting. In case it's useful there is also this related Stackoverflow thread where I added some more commentary: https://stackoverflow.com/a/79118553/990642 |
what if for users that don't use docker desktop (like orbstack) and such? the |
I case you can use non-official images, I have created a custom built mongodb 6.x and 8.x arm64 versions compatible with bitnami/mongodb and bitnami helm charts. You can find the source code here: https://github.com/dlavrenuek/bitnami-mongodb-arm and the images are available on docker hub: https://hub.docker.com/r/dlavrenuek/bitnami-mongodb-arm. Please not that these images are only intended to be used for local development and not production usage. Example usage: global:
security:
# required to be set when using non-official images
allowInsecureImages: true
image:
registry: docker.io
repository: dlavrenuek/bitnami-mongodb-arm
tag: "8.0.4"
|
Hi, I've used a macbook with M3 processor. When I've put in EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU: 1, it works. services:
mongo:
platform: linux/amd64
image: 'bitnami/mongodb:8.0.4'
ports:
- "27017:27017"
env_file:
- .env
healthcheck:
test: ["CMD","mongosh", "--eval", "db.adminCommand('ping')"]
interval: 3s
timeout: 5s
retries: 5
environment:
MONGODB_USERNAME: ${DB_USER}
MONGODB_PASSWORD: ${DB_PASSWORD}
MONGODB_ROOT_PASSWORD: ${DB_PASSWORD}
MONGODB_DATABASE: "test"
EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU: 1
networks:
- "app"
networks:
app:
driver: bridge
|
Name and Version
bitnami/mongodb:5.0.10-debian-11-r3
What architecture are you using?
arm64
What steps will reproduce the bug?
I'm actually trying to run the Bitnami helm chart for Mongodb running in minikube on a M1 Mac. But I can replicate the problem with:
docker run --rm -it docker.io/bitnami/mongodb:5.0.10-debian-11-r3
What is the expected behavior?
I would like to see aarch64 (arm64) images published to dockerhub for 5.0.10 and newer versions of Mongo.
What do you see instead?
It hangs on this step forever. In the k8s template, the pod is restarted due to being detected as stuck and timed out.
I've tried to build these myself using the bitnami/containers repo, but I get the following error:
Additional information
According to the mongo forums the x86 binary requires the AVX CPU flag which isn't provided by the Rosetta x86 emulator, meaning it is expected that the x86 version of mongo would never be able to run on the aarch64 (arm64) architecture of a M1 Mac. https://www.mongodb.com/community/forums/t/mongodb-docker-container-not-starting-properly/160540
The text was updated successfully, but these errors were encountered: