Public | Automated Build

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

docker-mongodb

Installation

  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull recipediary/mongodb

Source

Usage

Run mongod

docker run -d \
  --name mongodb \
  --restart=always \
  -p 27017:27017 \
  recipediary/mongodb

Run mongod w/ persistent/shared directory

docker run -d \
  --name mongodb \
  -p 27017:27017 \
  -v <db-dir>:/data/db \
  recipediary/mongodb

Run mongod w/ HTTP support

docker run -d \
  --name mongodb \
  -p 27017:27017 \
  -p 28017:28017 \
  recipediary/mongodb mongod --rest --httpinterface

Run mongod w/ Smaller default file size

docker run -d \
  --name mongodb \
  -p 27017:27017 \
  recipediary/mongodb mongod --smallfiles

Run mongo cli

docker run -it --rm \
  --link mongodb:mongodb \
  recipediary/mongodb bash -c 'mongo --host mongodb'
Docker Pull Command
Owner
recipediary
Source Repository