Tag: mongodb

docker stack/swarm golang port not exposed

i have a tricky problem for a while with the new swarm mode. I simply try to run a go web server in the first and a mongo db in the second container. Therefor I am using a private test image and the standard mongo image. Calling the mongo service on port 27017 works. The […]

Suppress output from Codeship service

I’m testing a container in Codeship that requires a database. Using services in codeship-services.yml I’m linking the database container to the application container. The problem is the database container is printing a lot of output that gets mixed with the output of the tests. I want to get rid of the MongoDB logs completely but […]

How to allow incoming connection on a particular port from specific IP

I am running mongodb in a docker container with 27017 port exposed with host to allow remote incoming connection. I want to block incoming connection on this port except a particular IP. I tried with iptables but it is not working. Maybe because of the docker service for which iptables commands need to be modified. […]

Cannot connect to localhost with Rocketchat on Docker

I am trying to set up a development environment for a project which we are adopting. Part of the project is the deployment of Rocketchat with Mongo on Docker. I have installed the legacy DockerToolbox with Oracle VirtualBox, as I am running Windows 10 Home that does not support the current version of Docker and […]

Using MongoDB Docker on .NET Core

I’m trying to create an application that uses the .NET Core with MongoDB. For testing the application on a Windows env I’m using a docker with the mongo image. Sincerely is the first time that I use this so I’m a real dummy but I can’t figure out how to connect the application to the […]

Accessing docker service instances by service_name.n

I have a docker swarm on which say I deploy multiple instances of MongoDB. The instances on doing docker service ls services_mongo will show something along these lines service_mongo.1 service_mongo.2 service_mongo.3 My web services need individually pingable names for the mongo service and the url for mongo is composed of taking all 3 names. On […]

how does docker handle file creation?

My code dumps mongo collections to a local folder then uploads to s3 bucket cmd = “mongoexport ” \ “–host ” + url + \ ” –port ” + str(port) + \ ” –username ” + user + \ ” –password ” + password + \ ” –db ” + db_name + \ ” –collection […]

Mongo doesn't run after installing on Docker Centos image: Failed to connect to 127.0.0.1:27017

I am running a CentOS image with multiple dependencies for my app, one of which is mongo. All other dependencies seem to run when I run the image. However, mongo service does not seem to run. I have seen similar problems (not related to docker) but none of those solutions worked for me. My host […]

How to backup MongoDB in a setup with multiple Docker containers?

I have an application which is split into multiple Docker containers: Container 1 contains a MongoDB database Container 2 contains a python script which performs some operations on a daily basis and stores the results in the MongoDB of Container 1 using pymongo. Previously to using Docker, i.e., having the MongoDB and the python app […]

docker(Mac/Windows): how to access host machine service from the container?

I can access the host machine’s services from inside a docker container using –network=”host” option in docker run command. This works well on Ubuntu. The same command, though, isn’t working on Mac OS Sierra(10.12.4) and Windows 10. My use case is that I have a local mongoDB server running on mongodb://127.0.0.1:27017. I spin up my […]

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