Public | Automated Build

Last pushed: 2 years ago
Short Description
Rockmongo configurable from ENVAR
Full Description


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:

Forked version of Rockmongo with modified "config.php":


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:

  1. docker pull
  2. 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= -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

Docker Pull Command
Source Repository

Comments (3)
2 years ago

Thanks @moejay and bklau. Appreciate your comments!
(It's been while since I logged in to Docker Hub)

2 years ago

If you do --link you can reference it by name
this way you don't need to know the ip
e.g :
--link mongodb:db -e mongo_host=db

My 2 cents

3 years ago

Q: why do you need "-link mymongodb:db" since you already specified
"-e mongo_host= -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".