Tag: mongodb

gitlab-ci-multi-runner 9.2.0: ERROR: Job failed: exit code 252

I am running my tests inside a docker image on a docker gitlab executor. The logs are looking like this: Running with gitlab-ci-multi-runner 9.2.0 . . <after_script called> ERROR: Job failed: exit code 252 The last thing I am doing in my job script (shell) is a call to mongo eval My after_script for this […]

Not able to connect to mongodb replica set running in docker in different machine

I am using mongo server in which there are three dockers that are running and another one which maps all the three mongo dockers and creates replica from them. Config for same is: mongo1: build: mongodb/ hostname: mongo1 expose: – “27017” ports: – “ip:27017:27017” # links: # – mongo2:mongo2 # – mongo3:mongo3 restart: always volumes: […]

Installing mongoimport in a docker image

from my node scripts I need to execute mongoimport via the exec function from child_process. When it comes to the CI tests in the docker image I run into a problem: /bin/sh: 1: mongoimport: not found Now I inserted the installation of mongodb in the drone.yml file: – apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv EA312927 – […]

PyMongo – UserNotFound: Could not find user authenticated@admin

I checked the permission on the /etc/mongod.conf: vagrant@trusty64:/vagrant/test$ sudo docker exec -it mongodb ls -l /etc/mongod.conf -rw-r–r– 1 root root 472 Jun 22 00:09 /etc/mongod.conf Then, I checked it’s corresponding content: vagrant@trusty64:/vagrant/test$ sudo docker exec -it mongodb cat /etc/mongod.conf ## mongodb.conf, this file is enforced by puppet. ## ## Note: http://docs.mongodb.org/manual/reference/configuration-options/ ## ## where and […]

Running a script from a mongodb docker-container

I have script that restores the database restore.sh: mongorestore –port 27017 –db myapp `pwd`/db-dump/myapp I want to run this in a short lived docker-container using the image mvertes/alpine-mongo. To run a shortlived container the –rmis used: docker run –rm –name mongo -p 27017:27017 \ -v /data/db:/data/db \ mvertes/alpine-mongo But how do I execute my script […]

Run mongo shell script in mongo docker container

I feel like this should be easier than it seems, but I can’t find an answer elsewhere and I’m out of ideas. So the goal here is to have a mongo shell javascript file that can be run inside the mongo docker container from the local machines CLI. So, say I have a docker container […]

Permisson error with mongo when running docker

My docker-compose: version: “2” services: bimbucket-api: build: . ports: – “3007:3007” links: – mongo volumes: – .:/opt/app mongo: image: mongo volumes: – /data/db:/data/db ports: – “27017:27017” I get permissionerror: mongo_1 | chown: changing ownership of ‘/data/db/diagnostic.data/metrics.2017-06-27T13-32-30Z-00000’: Operation not permitted mongo_1 | chown: changing ownership of ‘/data/db/journal/WiredTigerLog.0000000054’: Operation not permitted mongo_1 | chown: changing ownership of […]

Unable to access MongoDB within a container within a Docker Machine instance from Windows

I am running Windows 7 on my desktop at work and I am signed in to a regular user account on the VPN. To develop software, we are to normally open a Dev VM and work from in there however recently I’ve been assigned a task to research Docker and Mongo DB. I have very […]

MongoDB in Docker container runs out of space for journal

I am using Docker for a test environment inside a VirtualBox virtual machine on Windows. Having the MongoDB container run out of disk space would not be a problem if removing and recreating the container fixed the problem, but this is not the case. How can I get this space back? Right now I’m destroying […]

How to connect to current container when starting Docker?

Basically, I’m trying to initialize a mongo database after spinning it up with Docker by using a mongodump and mongorestore. The mongorestore fails because it can’t connect to the hostname of the container. Any help would be appreciated. I’ve tried localhost instead and it doesn’t work either. My Dockerfile: FROM mongo RUN mongodump –host merchdev02.bcinfra.net […]

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