Tag: mongodb

Using mongo with docker and nfs storage

I have a glusterfs that works fine when i create a volume on Cent7 using: docker volume create… and providing the type as nfs, here is the full command I use to create the volume: docker volume create –name sv1_mongovol1 –opt type=nfs –opt device=:/root/gluster/mounts –opt o=addr=172.23.180.79 The above volume works perfectly if I use an […]

pyftpdlib Networkprotocol Error

I am using pyftpdlib and pymongo to build a FTP server with GridFS. Locally everything is working great. Now I want to run the server using Docker. I am using the Dockerimage python:3.6-alpine and a mongo:latest image. I run the ftp with: docker run -it –rm -p 21:21 ftpimage And the mongo image with: docker […]

something confused with docker

I’m trying to use docker for my project these days, but I’m confused with some problem with it. My project created by nodejs + mongodb + nginx, now I want to publish my project using docker. I don’t know whether I should use a node image + a mongodb image + a nginx image and […]

Windows Docker mongo container doesn't work with volume mount

I have the following docker command docker run -v //c/data:/data/db mongo and I get the following error response from docker / mongo MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=8706cbf1b78f db version v3.4.2 git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b OpenSSL version: OpenSSL 1.0.1t 3 May 2016 allocator: tcmalloc modules: none build environment: distmod: debian81 distarch: x86_64 target_arch: x86_64 […]

Cannot use mounted host directory from MongoDB with minikube

I’m currently testing minikube (v0.18.0) with MongoDB and I want to share directory between MongoDB (/data/db) and my local host (Mac). I ran $ mkdir /Users/minikube/mongodb $ minikube start –vm-driver=xhyve $ minikube mount /Users/minikube/ Then create a MongoDB pod like apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mongodb spec: replicas: 1 template: metadata: labels: app: mongodb […]

How to connect to mongodb using docker-compose?

docker-compose.yml mongo: image: tutum/mongodb environment: – AUTH=no volumes: – /Users/andrey/docker/mongodb:/mongo/db ports: – “27017:27017” parser: image: nazandr/goparser and Dockerfile goparser FROM golang:1.8 WORKDIR /app ADD parser.go /app/ RUN go get github.com/PuerkitoBio/goquery; go get gopkg.in/mgo.v2; go build -o parser ENTRYPOINT [“./parser”] What address need to use to connect mongo

Docker-Compose: how to mapping volume from host into container?

The Problem: I’d like to share a folder from the docker host with a specific container using docker-compose. A container running MongoDB shall place its data files into /var/lib/mongodb, but this folder shall be a mount to the hosts folder /var/lib/mongodb. But it still remains an own local directory within the container, not the shared […]

Run MongoDB in a Docker container with no volumes

This is a slitty odd question but I would like to run a mongo DB with no volume at all. The reason is, so I can run tests on the CI and be able to clear everything down after the tests run. We are building the image from the Docker Mongo dockerfile and removing the […]

how to add user for docker mongodb

I follow the document of docker mongodb image to add a user for mongodb,: $ docker run –name some-mongo -d mongo –auth $ docker exec -it some-mongo mongo admin the I tried to add a user but it comes error: ‘it’s not not authorized.’ I’m so confused , how to add a user? if I […]

Docker with Symfony and MongoDB

I want to make a project in PHP (Symfony) and MongoDB. I created the file docker-compose.yml: web_server: build: . ports: – 5000:5000 links: – mongo mongo: image: mongo:3.0 container_name: mongo command: mongod –smallfiles expose: – 27017 And I try to run Docker Compose in PHP Storm but I recived: Removing old containers… (Re)building services… mongo […]

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