Mongo DB Raspberry PI4

I have a Raspberry Pi 4 where I installed Docker, but I’m having trouble installing MongoDB because the architecture is not correct (aarch64).
However, I believe it should be possible, and I’ve tried other images, but it still doesn’t work. Can you help me?

mongodb:
image: arm64v8/mongo
container_name: mongodb
volumes:
- /home/pi/mongodb:/data/db
ports:
- “27017:27017”
restart: unless-stopped

This is the Docker Compose configuration I’m using.
even with this image is not working : mongo:latest

1 Like

Seems there is no love for MongoDB on ARM, current Docker Hub has no arm tags anymore. Related discussion (link).

Maybe check the Percona MongoDB (link), they still have arm64 tags.

The problem isn’t MongoDB on ARM (pre-built ARM64 packages of community edition are published by the company for macOS, debian, ubuntu, etc.), the problem is the Broadcom chip used on Pi 4’s being too old.

I have built and published MongoDB 6.0+ for Pi’s that do (Pi 5) and don’t (Pi 4) meet the microarchitecture requirements of MongoDB here. I bundle these binaries in a docker image and publish that on Github here as well. These will work for personal use, I would not recommend using them in production because they are unsupported by the company.

You should be able to use the ARM64 pre-built binaries from the company on a Pi 5 now, though you won’t see much official documentation about it, and I do not know if docker images for the Pi 5 are in the works.

File an issue on either of those repos if you have further issues using these unofficial Raspberry Pi images that I maintain. I hope this helps.

2 Likes

@themattman thanks a lot, i was able to get MongoDb running on my Raspberry Pi 4 8gb with no problems.

1 Like