An override of the official mongo image that allows to set up username, password and database via docker-compose environment variables.
An example docker-compose.yml looks like this:
version: '2'
services:
mongo:
image: stefda/mongo
environment:
USERNAME: myusername
PASSWORD: mypassword
DATABASE: mydatabase
ports:
- 27017:27017
To connect, one must authenticate against the admin database:
mongo --host <docker_ip> --authenticationDatabase admin -u myusername -p mypassword mydatabase
Content type
Image
Digest
Size
125.8 MB
Last updated
over 9 years ago
docker pull stefda/mongo