mongodbdockerubuntu

Error when running mongo image - docker-entrypoint.sh: line 381


After installing Ubuntu v20 and then installing docker:

$ docker network create test-network

$ docker pull mongo:latest

$ 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 need some guidance to investigate the issue.

UPDATE

I don't have any problem with other tags.

Specifically, only when I want to run Mongo with the latest tag, I got this error.


Solution

  • 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