Tag: mongodb

Docker mongodb share volume with mac os x

I try to use the mongodb official docker image on mac os x 10.10.2 with this command inside mac terminal : docker run -v /Users/john/data/db:/data/db -p 27017:27017 mongo –smallfiles But it exits with this error log : 2015-04-11T10:53:19.709+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal 2015-04-11T10:53:19.711+0000 I JOURNAL [initandlisten] recover begin 2015-04-11T10:53:19.711+0000 I STORAGE [initandlisten] In File::open(), […]

How to create user in mongodb with docker-compose

Good evening, I’m trying to create some kind of script that will create a docker with mongodb and automatically create a user. I can usually manage my docker images with docker-compose but this time, I don’t know how to do it. Basically, here is what I have to do : 1) clean/destroy container (docker-compose down) […]

Docker Compose : NodeJS + MongoDB

I can’t make my docker compose work. Here’s my dockerfile: FROM node:0.12 RUN apt-get update -qq && apt-get install -y build-essential libpq-dev RUN mkdir /myapp WORKDIR /myapp ADD . /myapp RUN npm install My docker-compose.yml db: image: mongo ports: – 27017 web: build: . command: npm start volumes: – .:/myapp ports: – 3000:3000 links: – […]

How do you set-up Mongo replica set on Kubernetes?

I’d like to set-up a Mongo replica set on Kubernetes. I’d like to have three replicas. This means I’d need to start 3 instances. Should I start three pods, with Mongo in each one, and use the service the point to the primary? Or should I used a replication controller somehow?

How to deploy mongoDB Docker image to Elastic Beanstalk?

i’m running my multi services architecture using Docker and aws Elastic Beanstalk. One of those services is a mongoDB Docker image. It’s supposed to expose port 27017 so other services can connect to the mongo DB in that port. Unfortunately Elastic Beanstalk internal nginx only exposes port 80, so my services aren’t able to connect […]

How to start a mongodb shell in docker container?

To start the container, I am typing the following command: sudo docker run -i -t -p 28000:27017 mongo:latest /usr/bin/mongod –smallfiles But I want to open the shell in this container to type the mongo commands. What command should I run to do the same?

Deploy mongodb replicaset servers with Docker on different physical servers

I’m trying to deploy a mongodb replicaset using docker. I managed to do it on a same server by executing this : docker run -d –expose 27017 –name mongodbmycompany1 dockerfile/mongodb mongod –replSet rsmycompa docker run -d –expose 27017 –name mongodbmycompany2 dockerfile/mongodb mongod –replSet rsacommeassure docker run -d –expose 27017 –name mongodbmycompany3 dockerfile/mongodb mongod –replSet rsacommeassure […]

How to create a Mongo Docker Image with default collections and data?

I need support here to build my own mongo docker image. I have a list of scripts to create and insert data into the MongoDB that shall be called in my Dockerfile to deliver a docker image with default collections and data. Here is how my Dockerfile looks like currently: FROM mongo:latest RUN mkdir -p […]

docker-compose to run django with mongodb

I am facing problem using docker-compose to link a django container with postgres and mongo containers? I am trying to use “docker-compose up” which starts up the mongo and postgres containers (as I need to link both) but still the django app is not able to connect to mongodb on default settings. My django-compose.yml file […]

install mongoose in docker container

I am trying to dockerize my node.js application. I created a Dockerfile, below are the contents of Dockerfile # Official node base image FROM node:0.12 # Bundle app source COPY . /src RUN apt-get update && apt-get install -y –no-install-recommends libkrb5-dev supervisor \ && cd /src \ && npm install \ && rm -rf /var/lib/apt/lists/* […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.