A CentOS Docker Image with MongoDB Installed
1.0K
This Docker Image runs MongoDB in CentOS 8 and exposes the following ports...
docker build -t mongodb .
docker volume create mongo
docker run -tid --mount source=mongo,target=/var/lib/mongo --rm -p 27017:27017 --name mongodb mongodb
docker container ls
netstat -anp tcp | grep LISTEN
netstat -tulpn | grep LISTEN
mongo
The instance is setup with a replset flag so you probably want to....
mongo> rs.initiate();
docker volume rm mongo
Content type
Image
Digest
Size
276.4 MB
Last updated
over 6 years ago
docker pull rhyscampbell/dockermongodb