Tag: mongodb

Using service start/stop with Docker

I have a running docker container and I would like to execute : service mongod status/start/stop ..etc I would like to konw why I am having this output: sudo docker exec 29c7bf21111e bash -c “service mongod status” Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mongod status Since the script […]

Mounted volume not working when linked

I am trying to run a mongodb image that has it’s database on the host. Then link that container to a container running a nodejs application. The mongodb container is started in the following way: docker run -d \ -v $(pwd)/../mongodb/log:/var/log/mongodb/ \ -v $(pwd)/../mongodb/db:/data/db \ -v $(pwd)/../mongodb/mongod.conf:/etc/mongod.conf \ –name mongodb \ mongodb:dev mongod Then the […]

How to use vagrant docker-run with container environment variable expansion

I’m using vagrant and docker on a Windows 7 machine with VirtualBox as a provider for the docker host VM. I have a vagrant project defined with the docker provider so that vagrant up will start the mongo container. I am not provisioning the mongo container in the docker host VM because I will sometimes […]

How to set-up Mongo replica set on Kubernetes?

I’m trying set-up a three node Mongo replica set on Kubernetes. My thoughts is start three pods, with Mongo in each one, when the pod starts, it automatically sets up the replica set, so I need to modify the Mongo image Dockerfile to execute some command in Mongo shell. But I am stuck at executing […]

Improving performance of inserting into Mongo from ActiveMQ

The basic idea of the following code is I read messages off an ActiveMQ Artemis installation and insert them into a MongoDB instance. It works well for up to a hundred or so messages per second but crashes if I throw a few thousand at it. My first guess would be the constant opening and […]

Sails application cannot accessed from web browser. Connection refused

I am trying to develop a sails application that uses mongodb which works under docker. Steps that I followed is given below. Cloned application which contains mongodb connections from our git repository. Built it using following command docker build -t bit . Executed docker-compose up docker-compose up -d Tried to get port of the docker […]

How to do SSH tunneling with docker (machine & compose)?

I have a mongoDB container running on an instance built with docker-machine, maintained with docker-compose. The mongoDB process isn’t exposed to external traffic. I want to connect to the remote mongoDB server using a GUI tool installed locally and without exposing any ports on the remote machine. What’s the best way to do this? Is […]

can not connect to docker container mapping port

I use mongo image in docker, but I can not connect to 20217 port. docker@default:~$ docker ps prot info show:>20217/tcp, 27017/tcp but, gilbertdeMacBook-Pro:~ gilbert$ lsof -i tcp:20217 there is no PID, gilbertdeMacBook-Pro:~ gilbert$ docker info Containers: 3 Images: 43 Server Version: 1.9.1 Storage Driver: aufs Root Dir: /mnt/sda1/var/lib/docker/aufs Backing Filesystem: extfs Dirs: 50 Dirperm1 […]

Connection slow from node to mongodb

I’m experimenting with docker and reflected a very slow connection from the nodejs (4.2.3) container to mongodb (3.2) container. My setup, very basic, is this (docker-compose): version: ‘2’ services: web: build: ./app volumes: – “./app:/src/app” ports: – “80:3000” links: – “db_cache:redis” – “db:mongodb” command: nodemon -L app/bin/www db_cache: image: redis db: image: mongo My s.o. […]

Avoid persisting mongo data in docker-compose

I’m using docker compose to run tests for my application. The configuration looks like: version: ‘2’ services: web: build: . image: myapp:web ports: – “3000:3000” depends_on: – mongo links: – mongo mongo: image: mongo:3.2.6 Right now, when I run docker-compose up, there is a volume created automatically (by docker-compose or the mongo image?) which maps […]

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