Skip to content

Set up authentication fails. #49

@jjelev

Description

@jjelev

It would be nice to have env variables for authentication enabling, to set username/password, storage engine .. etc.
For guideline I have been using https://github.com/tutumcloud/mongodb/tree/master/2.6
Here is my dockerfile:

FROM mongo:2.6

RUN mongo admin --eval "db.createUser({user: 'myuser', pwd: 'mypass', roles:[{role:'dbOwner',db:'admin'}]});"

The build returns:

MongoDB shell version: 2.6.10
connecting to: admin
2015-08-01T00:59:42.877+0000 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-08-01T00:59:42.878+0000 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed

Expected result - to build the image and set up new user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions