-
Notifications
You must be signed in to change notification settings - Fork 649
mongo:latest image is missing mongo binary #558
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
Comments
You can use $ docker run -d --name mongo mongo:6
4298382d6a44e1e04d7bdceaf1f55d0e778858c6c63cb9e401dc68007f60172b
$ docker exec -it mongo mongosh
Current Mongosh Log ID: 63079e8c19747686a983a543
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.5.4
Using MongoDB: 6.0.1
Using Mongosh: 1.5.4
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy).
You can opt-out by running the disableTelemetry() command.
------
The server generated these startup warnings when booting
2022-08-25T16:08:31.154+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
2022-08-25T16:08:31.733+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2022-08-25T16:08:31.734+00:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
2022-08-25T16:08:31.734+00:00: vm.max_map_count is too low
------
------
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
------
test> |
If it is gone then should the mongo/5.0/docker-entrypoint.sh Line 199 in b149de1
Which shows up in my docker logs as |
Testing a fix since |
is the mongo binary going away? |
From MongoDB upstream's perspective, it's been "going away" since they introduced |
* ci(docker-entrypoint.sh): change mongo commands into mongosh docker-library/mongo#558 fix #2 * test(watcher.test.ts): add callbackStreamCloseEvent attribute to a test
… healthcheck With MongoDB 6 containers (released in the last week), the `mongo` binary is gone, replaced by `mongosh`. See docker-library/mongo#558 Our tests were using `mongo:latest`. For now let's lock to mongo:5 and then have a separate issue for updating container versions for testing.
… healthcheck (#2936) With MongoDB 6 containers (released in the last week), the `mongo` binary is gone, replaced by `mongosh`. See docker-library/mongo#558 Our tests were using `mongo:latest`. For now let's lock to mongo:5 and then have a separate issue for updating container versions for testing.
I'm following some old videos on docker and this error really bothered me. Finally I got to interact with mongodb shell. Leaving a comment just to say thank you :) |
This comment was marked as spam.
This comment was marked as spam.
Does anyone know the earliest compatibility of mongoDB for which we can use mongosh? Nothing is mentioned in the official docs - https://www.mongodb.com/docs/mongodb-shell/ |
Looks like $ docker run -it --rm mongo:4.2 mongosh
Unable to find image 'mongo:4.2' locally
4.2: Pulling from library/mongo
456d651ccb27: Pull complete
0d873b46166f: Pull complete
b700537f311e: Pull complete
8ba0f53e4854: Pull complete
80b58c92c83f: Pull complete
f4ed2f74d01b: Pull complete
0a2bd86063a1: Pull complete
e17a773a5f37: Pull complete
4855607e00c3: Pull complete
Digest: sha256:c7686ce0243cdc5eab7090c871a126d9c85c01f45a8395ffe3a352934ddd0570
Status: Downloaded newer image for mongo:4.2
/usr/local/bin/docker-entrypoint.sh: line 418: exec: mongosh: not found
$ docker run -it --rm mongo:4.4 mongosh
Unable to find image 'mongo:4.4' locally
4.4: Pulling from library/mongo
7608715873ec: Already exists
aa7638a79c68: Pull complete
6edb8e32447e: Pull complete
9b078a16e980: Pull complete
a09083ae9827: Pull complete
8eafcd88aa89: Pull complete
7d81a4f8c99b: Pull complete
d248a55d605e: Pull complete
19bc9dacc663: Pull complete
Digest: sha256:164c3f8dd6c81f95346c478e7cc447a58804cb661c623d542f416221cd6c037c
Status: Downloaded newer image for mongo:4.4
/usr/local/bin/docker-entrypoint.sh: line 418: exec: mongosh: not found
$ docker run -it --rm mongo:5.0 mongosh
Unable to find image 'mongo:5.0' locally
5.0: Pulling from library/mongo
7608715873ec: Already exists
aa7638a79c68: Already exists
6edb8e32447e: Already exists
9b078a16e980: Already exists
a09083ae9827: Already exists
6d64b6b8a202: Pull complete
8e34d62e5cec: Pull complete
439b8e6e66a4: Pull complete
8178acfc9a68: Pull complete
Digest: sha256:6a40ccbb4b6ad30a3602c9eff982f1aec828e78279aeb7c813f9f6d1cec4571e
Status: Downloaded newer image for mongo:5.0
Current Mongosh Log ID: 63fcf14815a57edbaf2edd65
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.7.1
MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017 |
https://github.com/mongodb-js/mongosh/blob/9cf53bc336c79e505cf034bf5e6f3b3b3796cf25/package.json#LL125C6-L125C6 specifies version |
Mongodb now requires mongoose command: docker-library/mongo#558
This comment was marked as off-topic.
This comment was marked as off-topic.
@ale900522 You are using an older version which doesn’t have mongosh. |
… healthcheck (elastic#2936) With MongoDB 6 containers (released in the last week), the `mongo` binary is gone, replaced by `mongosh`. See docker-library/mongo#558 Our tests were using `mongo:latest`. For now let's lock to mongo:5 and then have a separate issue for updating container versions for testing.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
as of today we face an issue with the
mongo
command.Steps to reproduce:
docker run -it --rm --name mongo mongo:latest mongod
mongo
in the started mongodbdocker exec -it mongo mongo
This delivers the following error:
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
With version 5.0 the
mongo
command is working as expected.Expected
mongo
command is still workingFurther info
We use a project called testcontainers which starts a mongo:latest and connects with command
mongo
. This fails with the explained behaviour.Related to this: testcontainers/testcontainers-java#5768
Best
Michael
The text was updated successfully, but these errors were encountered: