Public | Automated Build

Last pushed: 6 months ago
Short Description
Navigator-instance for mongo db single host
Full Description

navigator-instance

Mongo DB Single Instance
Version: 3.4

Docker hub

https://hub.docker.com/r/stuartshay/navigator-instance/

Build

Build Requirements: Linux Host

docker build -t navigator-instance .

Run

MongoDB Server & WebUI

docker run --rm --name  navigator-instance -p 27017:27017  -p 28017:28017 navigator-instance

Using this image as dbloader

Single mode:

docker run --rm -it -e MONGO_HOST=navigator-instance --link navigator-instance:navigator-instance stuartshay/navigator-instance

Replica set mode:

docker-compose --file navigator-cluster.yml  up
docker run --rm -it \
    -e MONGO_HOST=rs1,rs2,rs3 \
    -e MONGO_RS=rs \
    --link rs1:rs1 \
    --link rs2:rs2 \
    --link rs3:rs3 \
    stuartshay/navigator-instance

Attached Volume

Attach Local Directory to Container Mount

Windows
mkdir d:\data\
docker run --rm --name navigator -v /d/data:/backup  -p 27017:27017  -p 28017:28017 stuartshay/navigator-instance
Linux
mkdir /backup 
docker run --rm --name navigator -v /backup:/backup  -p 27017:27017 -p 28017:28017 stuartshay/navigator-instance
Commands
 docker inspect <CONTAINERID> | jq '.[].Mounts'
 docker exec -i -t  <CONTAINERID> /bin/bash

Container Utilities

/scripts/backup.sh # Backup Database

Client Configuration

db.yml

Tools

Robomongo

Tag & Push to Docker Hub

docker tag <imageid> navigator-instance:stable
docker tag navigator-instance:stable stuartshay/navigator-instance:stable

docker push stuartshay/navigator-instance:stable
Docker Pull Command
Owner
stuartshay
Source Repository

Comments (0)