Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongo command not found after installing in docker [duplicate]

Tags:

docker

mongodb

I have run the following commands, and then was able to successfully login to mongo root (as shown in the image). When I typed mongo I get the following error. Why is this and how can I solve it?

bash: mongo command not found

Docker run -d -p 27017:27017  --name shopping-mongo mongo
Docker logs -f shopping-mongo
Docker exec -it shopping-mongo /bin/bash

enter image description here

like image 904
Illep Avatar asked Jul 04 '26 09:07

Illep


1 Answers

Have you tried mongosh? Mongo is not supported in the newer versions

like image 189
akram seid Avatar answered Jul 06 '26 01:07

akram seid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!