Skip to content

Commit 4a2829d

Browse files
committed
adding notes about building the docker container
1 parent 7b39893 commit 4a2829d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
## MongoDB
22
Runs the MongoDB container configured to use the local `/data` folder for its file storage.
33

4+
## Docker
5+
[![](https://badge.imagelayers.io/luiscape/rolltime-mongo:latest.svg)](https://imagelayers.io/?images=luiscape/rolltime-mongo:latest 'Get your own badge on imagelayers.io')
6+
7+
A volume needs to be mounted in the container if the data needs to be persistent.
8+
49
```
5-
docker run -v "$(pwd)":/data --name mongodb \
6-
-e MONGODB_USER_NAME=rolltimedev \
7-
-e MONGODB_USER_PASSWORD=rolltimedev \
8-
-e MONGODB_DATABASE=rolltime \
9-
-d mongo mongod --smallfiles
10+
docker run
11+
-v ./data:/data \
12+
--name mongodb \
13+
-d luiscape/rolltime-mongo:latest
1014
```

0 commit comments

Comments
 (0)