RockMongo Docker modified from "webts/rockmongo" implementation
Rockmongo used for this container is pulled from a forked version of Rockmongo with some modification on the "config.php" that will check for values from environmen variables before setting the default values.
Original Rockmongo repository: https://github.com/iwind/rockmongo
Forked version of Rockmongo with modified "config.php": https://email@example.com:gilacode/rockmongo.git
Currently this implementation only support overriding 1 database configuration. Default implementation Rockmongo allows for multiple Mongo database connection.
Next planning to add the capability for Rockmongo to read from environment variables in JSON format so we can put multiple database configurations and request for pull. Busy at the moment to do that. :)
docker build -t gilacode/rockmongo
To run this docker container. Run:
- docker pull
- docker run -d -p <port to exposed>:80 -link <your mongo db container name>:db -name rockmongo -e mongo_name=<name to display during login> -e mongo_host=<ip address of your mongo instance> -e mongo_port=<mongo db port no> -e mongo_auth=<true/false> gilacode/rockmongo
Example: docker run -d -p 8008:80 -link mymongodb:db -name rockmongo -e mongo_name=MYMONGO -e mongo_host=192.168.0.50 -e mongo_port=27017 -e mongo_auth=true gilacode/rockmongo
As commented by user @moejay. We don't really need to explicitly pass the IP address:
docker run -d -p <exposed port>:80 -link <mongo db container name>:db -name rockmongo -e mongo_host=db gilacode/rockmongo
Thanks @moejay and bklau. Appreciate your comments!
(It's been while since I logged in to Docker Hub)
If you do --link you can reference it by name
this way you don't need to know the ip
--link mongodb:db -e mongo_host=db
My 2 cents
Q: why do you need "-link mymongodb:db" since you already specified
"-e mongo_host=192.168.0.50 -e mongo_port=27017", unless you are tryiing to acess some logs files. Is that the case?
It would be more helpful not to rely on the "--link".