Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description



FROM node:0.12-slim

RUN apt-get update && apt-get install -y git vim && npm install andzdroid/mongo-express

WORKDIR /node_modules/mongo-express

RUN echo '#!/bin/bash' >

RUN echo sed -r \
    -e "\"s/(server:) 'localhost'/\\\1 '\$container'/\"" \
    -e "\"s/(port:) 27017/\\\1 \$mongoPort/\"" \
    -e "\"s/(adminUsername:) ''/\\\1 '\$adminUser'/\"" \
    -e "\"s/(adminPassword:) ''/\\\1 '\$adminPass'/\"" \
    -e "\"s/(username:) 'admin'/\\\1 '\$webAdmin'/\"" \
    -e "\"s/(password:) 'pass'/\\\1 '\$webPass'/\"" \
    -e "\"s/(port:) 8081/\\\1 \$webPort/\"" \
    config.default.js \> config.js >>

RUN echo node app >>

RUN chmod +x

CMD ["/node_modules/mongo-express/"]

#How to run this container

docker run -it --rm --name mongo-express --link MONGO_CONTAINER:MONGO_CONTAINER -e container="MONGO_CONTAINER" -e mongoPort="MONGO_PORT" -e adminUser="ADMIN_USER" -e adminPass="ADMIN_PASS" -e webAdmin="WEB_ADMIN" -e webPass="WEB_PASS" -e webPort="WEB_PORT" -p WEB_PORT:WEB_PORT acook/mongo-express


  • MONGO_CONTAINER = the name of your running Mongo Docker container
  • MONGO_PORT = the port that your Mongo instance is running on (i.e. 27017)
  • ADMIN_USER = the admin username for your Mongo instance
  • ADMIN_PASS = the admin password for your Mongo instance
  • WEB_ADMIN = the username to login to the mongo-express web console
  • WEB_PASS = the password to login to the mongo-express web console
  • WEB_PORT = the port to run your mongo-express instance on (i.e. 8081)

For example if using:

docker run -it --rm --name mongo-express --link mongo:mongo -e container="mongo" -e mongoPort="27017" -e adminUser="admin" -e adminPass="password" -e webAdmin="admin" -e webPass="password" -e webPort="8081" -p 8081:8081 acook/mongo-express

Web interface would be available via: http://<ip_address>:8081

Docker Pull Command
Source Repository