frodenas / docker-mongodb Goto Github PK
View Code? Open in Web Editor NEWA Dockerfile that produces a Docker Image for MongoDB
License: Apache License 2.0
A Dockerfile that produces a Docker Image for MongoDB
License: Apache License 2.0
Hi Ferran,
I've tried to use your docker image but it seems the authentication is not working.
That is how I am using.
mongo:
image: frodenas/mongodb:2.6
ports:
- ${AKENEO_MONGO_PORT}:27017
environment:
MONGODB_DBNAME: akeneo_pim
MONGODB_USERNAME: akeneo_pim
MONGODB_PASSWORD: akeneo_pim
It seems the database is up and the credentials were ok.
mongo_1 | 2017-02-24T09:40:58.120+0000 [conn2] command akeneo_pim.$cmd command: createUser { createUser: "akeneo_pim", pwd: "xxx", roles: [ { role: "dbOwner", db: "akeneo_pim" } ], digestPassword: false, writeConcern: { w: "majority", wtimeout: 30000.0 } } keyUpdates:0 numYields:0 reslen:37 110ms
mongo_1 | Successfully added user: {
mongo_1 | "user" : "akeneo_pim",
mongo_1 | "roles" : [
mongo_1 | {
mongo_1 | "role" : "dbOwner",
mongo_1 | "db" : "akeneo_pim"
mongo_1 | }
mongo_1 | ]
mongo_1 | }
mongo_1 | 2017-02-24T09:40:58.125+0000 [conn2] end connection 127.0.0.1:43286 (0 connections now open)
....
mongo_1 | 2017-02-24T09:40:58.143+0000 [signalProcessingThread] shutdown: removing fs lock...
mongo_1 | 2017-02-24T09:40:58.143+0000 [signalProcessingThread] dbexit: really exiting now
mongo_1 | ========================================================================
mongo_1 | MongoDB User: "akeneo_pim"
mongo_1 | MongoDB Password: "akeneo_pim"
mongo_1 | MongoDB Database: "akeneo_pim"
mongo_1 | MongoDB Role: "dbOwner"
mongo_1 | ========================================================================
mongo_1 | Starting MongoDB...
mongo_1 | 2017-02-24T09:40:59.174+0000 [initandlisten] MongoDB starting : pid=29 port=27017 dbpath=/data 64-bit host=f402dd1b6804
but then when I try to connect I get this error:
root@b5532377add2:/var/www/akeneo# mongo mongo:27017/akeneo_pim -u akeneo_pim -p
MongoDB shell version: 2.4.10
Enter password:
connecting to: mongo:27017/akeneo_pim
Error while trying to show server startup warnings: not authorized on admin to execute command { getLog: "startupWarnings" }
Any idea what is wrong? thank you again
Not sure what is going on:
Sending build context to Docker daemon 89.09 kB
Sending build context to Docker daemon
Step 0 : FROM frodenas/ubuntu
latest: Pulling from frodenas/ubuntu
3aab33c05776: Pull complete
fa701c755887: Pull complete
5e6679fa337b: Pull complete
4ed5b1cffbdf: Pull complete
582f75c3f95c: Pull complete
f15ce52fc004: Already exists
c4fae638e7ce: Already exists
a4c5be5b6e59: Already exists
8693db7e8a00: Already exists
Digest: sha256:e04fbb8413cd10539c178a3f1f725753cf0efee9deaaeec7712dffb56fa64034
Status: Downloaded newer image for frodenas/ubuntu:latest
---> 582f75c3f95c
Step 1 : MAINTAINER Ferran Rodenas <[email protected]>
---> Running in 4223bdcc0527
---> a140959eaae9
Removing intermediate container 4223bdcc0527
Step 2 : RUN DEBIAN_FRONTEND=noninteractive && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 && echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list && apt-get update && apt-get install -y --force-yes mongodb-org=3.0.7 mongodb-org-server=3.0.7 mongodb-org-shell=3.0.7 mongodb-org-mongos=3.0.7 mongodb-org-tools=3.0.7 && service mongod stop && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Running in 250f6ac92d8f
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.ds7Djuzavc --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
?: keyserver.ubuntu.com: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Connection timed out
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
INFO[0078] The command [/bin/sh -c DEBIAN_FRONTEND=noninteractive && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 && echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list && apt-get update && apt-get install -y --force-yes mongodb-org=3.0.7 mongodb-org-server=3.0.7 mongodb-org-shell=3.0.7 mongodb-org-mongos=3.0.7 mongodb-org-tools=3.0.7 && service mongod stop && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*] returned a non-zero code: 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.