Get the mongo image sudo docker pull mongo Run the mongodb service sudo docker run -p 27017:27017 -v /tmp/db:/data/db -d mongo Run the mongodb client sudo docker run -it mongo mongo --host <host IP address> --port 27017 > show dbs admin 0.000GB config 0.000GB local 0.000GB > use local switched to db local > show collections startup_log > db.startup_log.find() ... Use mongo-express to manage mongodb mongo-express is a visual graphical management tool for MongoDB. Here we still run a mongo-express through docker to manage the mongodb service created above. Download the mongo-express image sudo docker pull docker.io/mongo-express Start the mongo-express service sudo docker run -it --rm -p 8081:8081 --link <mongoDB container ID>:mongo mongo-express Access mongo-express Access through a browser http://<host machine IP address>:8081 Use mongoclient to manage mongodb Download the mongoclient image sudo docker pull mongoclient/mongoclient Start the mongoclient service Copy the code as follows: sudo docker run --name mongoclient -d -p 3000:3000 -e MONGO_URL=mongodb://<host machine IP address>:27017/ mongoclient/mongoclient Access mongoclient Access through a browser http://<host IP address>:3000 The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Commonplace talk about MySQL event scheduler (must read)
>>: How to use webpack and rollup to package component libraries
Method 1: Use CSS overflow omission to solve The ...
The following script is used for scheduled backup...
This article shares the specific code of the vue3...
Table of contents Preface think Library directory...
Install SSHPASS For most recent operating systems...
Table of contents Preliminary work Backend constr...
1. Design source code Copy code The code is as fol...
MySQL 5.7.17 installation and configuration metho...
Table of contents 1. Live broadcast effect 2. Ste...
Table of contents Preface Case: Imitation of JD.c...
Docker tag detailed explanation The use of the do...
Table of contents 1. Bootstrap Grid Layout 2. Ver...
Exposing network ports In fact, there are two par...
1. Force no line break and end with an ellipsis. C...
When installing the centos7 version, choose to co...