Mongodb on the container

Hello,

So i am performing a Use case using the monogdb community server and im using this particular image docker image

“mongodb/mongodb-community-server:8.0.0-ubuntu2204-20250112T081637Z”

IM USING THE VMWARE ON WHICH MY TANZU CLUSTER HAS BEEN CREATED
AND THE ERROR WHICH I AM GETTING IS
“exec /usr/bin/mongod: exec format error”

i know about the error, it could be the architecture mismatch error

but i have tried the image on my local minikube , on using the particular image it is working , my containers are running, what could be the issue i have check the image arch and my vmware architure they are also matching.

The error, as you’ve stated means the architecture running on the environment doesn’t match the architecture of the binary… I don’t think it’s mongodb related. In the container can you check the system architecture to ensure compatibility?

  • Check Architecture Compatibility
uname -m
file /usr/bin/mongod
  • Reinstall MongoDB
sudo apt-get remove --purge mongodb-org
sudo apt-get install mongodb-org

Also… let’s ensure proper execution permissions

sudo chmod +x /usr/bin/mongod

hi @michael
I have already checked the architecture of the image and vmware , they both are matching
and in my manifest file , im using init containers to give root permission to my container.

If it were me, I’d add a bunch of debug output, capturing the state of the mongodb executable and the architecture… share those logs if you can. It has to be something with either the package install or the OS in the container. Sorry for the troubles - hopefully we can help.