Tag: mongodb

Install MongoDB and Tomcat using Dockerfile

I was using the Dockerfile mentioned below to install packages of python, mongodb and tomcaton Centos6. FROM centos:centos6 RUN yum install -y centos-release-scl && \ yum install python27 && echo -e “[mongodb-org-3.2]\nname=MongoDB Repository\nbaseurl==https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/\ngpgcheck=1\nenabled=1\ngpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc” > /etc/yum.repos.d/mongodb-org.repo && \ yum install -y mongodb-org && \ yum install -y tomcat6 CMD [“/bin/bash”] I was getting the error below […]

How MongoDB works with Docker

a quick question about how docker and mongo coexist. When I deploy my app to docker hub, does it include db records? When docker removes mongo records. When I stop container, or only when I remove it?

Docker-compose depend_on

I have a mongodb service and a test service running with docker-compose: services: mongo: image: myrepo/mongo ports: – “27017:27017” test: depends_on: – mongo image: myrepo/elixir-tests command: sh start.sh in the start.sh script i am trying to run: mongo –eval “printjson(….))” but i get the following error : start.sh: 10: start.sh: mongo: not found My […]

Docker mount directory access rights

I’ve got a docker container running a MongoDB database. To keep the data persistant I mount a volume on the container which is a AWS EBS volume formatted with xfs (the MongoDB recommendation). The run command is the following: $ docker run –name MongoDB -p 27017:27017 –volume /data/mongo/db:/data/db –volume /data/mongo/conf:/data/configdb mongo:3.4 –config /data/configdb/mongodb.conf But I […]

Connect to mongoDB socket in Docker

I have a docker container that has Rails and mongoDB running in it. I set the mongo configuration to use a unix socket for the connection because the only resource that really needs to connect to it (the rails app) is running in the container. Whenever I try to connect to the mongo shell I […]

Run project dependencies commands from dockerfile

I have a laravel project that requires: mysql database image mongo database image dependencies: npm, composer, gulp, bower So I created a docker-compose.yml with 3 services: version: ‘2.0’ services: db-mysql: image: mysql environment: – “MYSQL_DATABASE=app_db” – “MYSQL_USER=db_user” – “MYSQL_PASSWORD=nutella” – “MYSQL_ROOT_PASSWORD=choco” db-mongo: image: mongo app: volumes: – C:\Users\svirl\Documents\workspace\app-web:/var/www/html/:rw build: app links: – db-mysql – db-mongo […]

Mounting host volume for mongo data in docker compose container

I’d like to run mongo in a docker container, alongside some others I’m using via docker-compose. I thought mounting the volume like so would allow for it to persist data outside the container: db: image: mongo command: -smallfiles -nojournal volumes: – ./mongo_data:/data It seems to create some directories, but there’s no files on the host […]

Connecting a Dockerized MongoDb instance, behing a reverse Nginx proxy on EC2

I try to connect Robomongo (or any other MongoDb UI) to a mongo instance, which is dockerized and behind an NGinx reverse-proxy (also dockerized, using jwilder/nginx-proxy) on a EC2 Container-Service instance. err screenshot here I have an application running using this mongo instance, on the same network, working like a charm ; so we know […]

Can't connect to Mongo DB in .Net Core api

Been working on a .Net Core web app and right now I want to connect Mongo with the api that is written in .Net C# on .Net Core. However, everything is inside Docker. That being said, each element is is working. I can edit the database from the command line so I know its up […]

How to use docker run with a Meteor image?

I have 2 containers mgmt-app who is a Meteor container and mgmt-mongo who is the MongoDB. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7b65be4ac454 gitlab-lab:5005/dfc/mongo:latest “/entrypoint.sh mongo” About an hour ago Up About an hour 27017/tcp mgmt-mongo dff0b3c69c5f gitlab-lab:5005/dfc/mgmt-docker-gui:lab “/bin/sh -c ‘sh $METE” About an hour ago Up 42 minutes>80/tcp mgmt-app From my […]

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