Tag: mongodb

How to avoid permission deny with uid/gid 1000 after mount volume with docker?

I am working on Docker version 1.12.5 with Fedora. I try to create a Mongodb container with following command: sudo docker run -v $PWD/db:/data/db -p 27017:27017 –name db -it username/mongo /bin/bash Here is the response after I start mongodb: # mongod root@32c9349a75b8:/# mongod 2016-12-26T09:59:08.643+0000 I CONTROL [initandlisten] MongoDB starting : pid=10 port=27017 dbpath=/data/db 64-bit host=32c9349a75b8 […]

Exposing docker container on local server

I have a nodejs-mongo db app that is running inside docker containers. I can access it on localhost etc… But now I would like to install/deploy these containers on a local server, so that I can access this application outside my network. Please note my server is Ubuntu 16.04.1 LTS (xenial) Also I would like […]

exposing Mongodb from docker container on server

I have Nodejs+Mongodb webapp running inside two separate docker containers I have 8080 for Nodejs and 27017 for Mongodb ports exposed in docker-compose.yml I use pymongo to submit data from my python script when I run it locally I am able to submit the data But when I run it on company (internal) server I […]

How to manage multiple backend stacks for development?

I am looking for the best/simplest way to manage a local development environment for multiple stacks. For example on one project I’m building a MEAN stack backend. I was recommended to use docker, however I believe it would complicate the deployment process because shouldn’t you have one container for mongo, one for express etc? As […]

Docker Swarm mode – equivalent docker commands to docker run -it ubuntu

I am trying to deploy a mongodb cluster on docker swarm mode, all the mongod daemon are in the same overlay network. I need to configure the mongodb cluster, i am trying to find a command that works like docker run -it ubuntu in docke rswarm mode so i can log in, any ideas? Or […]

Fail to build MongoDB replcaset with Auth on Swarm

I’m trying to create a MongoDB cluster on a docker swarm with authentication. (My process work when auth is disabled) So I have 3 mongo instance (started with option –auth –replicaset REPLICASET_NAME)on the same crypted overlay network. (mongo1, mongo2 and mongo3) On node with mongo1 container I initiate the replicaset and create the db admin […]

Unable to connect a dockerised keystone container with a dockerised mongo container

I am trying to get a dockerised keystoneJS to talk to a dockerised mongoDB instance and I am struggling to see where I am going wrong in terms of linking them together. I have gone through the docker docs and similar examples online that are trying to do what I am trying to do, but […]

Connect to mongo docker with authentication from other docker (node)

I have followed this guide: https://hub.docker.com/_/mongo/ And this commands: docker run –name some-mongo -d mongo –auth docker exec -it some-mongo mongo admin db.createUser({ user: ‘jsmith’, pwd: ‘some-initial-password’, roles: [ { role: “userAdminAnyDatabase”, db: “admin” } ] }); And now the command to connect is said to be docker run -it –rm –link some-mongo:mongo mongo mongo […]

docker php mongodb passing links to mongodb connection

I am trying to connect to mongodb from PHP 7. I have nginx container, php-fpm container and mongodb container. I installed mongodb driver using pecl and it is showing up in phpinfo(), mongodb ver. 1.2.3. Additionally I installed mongodb/mongodb using composer. I linked my containers to mongodb (eg –link mongodb_container:mongodb) Now when i am trying […]

How to export Mongo-database using Docker?

I use “mongoDB” image in docker-container. When I run command for export DB to csv: docker exec -i 418f46e5595d mongoexport –db saveInfo –collection infoobjects –type=csv –fields _id,postLink,postTitle,contactPhone –out ./info.csv File saved in folder where container is working. How can I save it on my machine?

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