After installing Ubuntu v20 and then installing docker:
$ docker network create test-network
$ docker pull mongo
$ docker run --network test-network --name mongodb \
-e MONGO_INITDB_ROOT_USERNAME=admin \
-e MONGO_INITDB_ROOT_PASSWORD=pawwrord \
mongo
I got an error like this:
/usr/local/bin/docker-entrypoint.sh: line 381: 25 Illegal instruction (core dumped) "${mongodHackedArgs[@]}" --fork
Do you know what the problem is? I just need some guidance to investigate the problem.
UPDATE
I don't have any problem with other docker hub images.
Specifically only when I want to run mongo, I got this error.
MongoDB 5.0 requires a Sandy Bridge or newer CPU. Get a newer processor or use an older version of MongoDB.
https://jira.mongodb.org/browse/SERVER-54407
I have exactly same problem with yours, i try to run on my local computer work but not in VM.
thanks to this I simply changed mongo's version to 4.4 from latest which is 5.0 and running well. Maybe need newer CPU
It's a shortcoming in the available instructions of your CPU. Mongo 5.0 requires CPU instructions only available in Sandy Bridge era or more recent.
I had this problem using a Proxmox VM, which defaults to a simpler virtual CPU. Simply changing the virtual CPU to type "host" fixed the problem, by allowing the VM CPU to include all the instructions of the host CPU.
If you are running directly on metal, you'll need a newer CPU. Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With