https://github.com/aymen94/mongodb-alpine
Docker Image of MongoDB Alpine with configuration
https://github.com/aymen94/mongodb-alpine
alpine alpine-linux docker dockerfile mongodb
Last synced: 2 months ago
JSON representation
Docker Image of MongoDB Alpine with configuration
- Host: GitHub
- URL: https://github.com/aymen94/mongodb-alpine
- Owner: aymen94
- License: mit
- Created: 2020-03-27T20:02:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-30T00:03:42.000Z (over 6 years ago)
- Last Synced: 2025-02-22T03:31:48.241Z (over 1 year ago)
- Topics: alpine, alpine-linux, docker, dockerfile, mongodb
- Language: Shell
- Homepage: https://hub.docker.com/r/aymen94/mongodb-alpine/
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://hub.docker.com/r/aymen94/mongodb-alpine/)
[](https://hub.docker.com/r/aymen94/mongodb-alpine/)
# MongoDB Alpine
Alpine Linux with MongoDB.
## Information
* apline 3.9
* MongoDB v4.0.5
## Install
Download image from the public docker hub:
```
$ docker pull aymen94/mongodb-alpine
```
To re-build this image from the dockerfile:
```
$ docker build -t aymen94/mongodb-alpine .
```
## Run
```
$ docker run -d --name mongodb -p 27017:27017 aymen94/mongodb-alpine
```
## Run with data mounted to the native host
```
$ docker run -v ~/my_mongo_data:/data/db -it -p 27017:27017 aymen94/mongodb-alpine
```
## Run a shell session
To use the mongo shell client:
```
$ docker exec -ti mongodb sh
```
The mongo shell client can also be run its own container:
```
$ docker exec -ti mongodb mongo
```
## Configuration
To change internals default configurations
```
MONGODB_STORAGE_ENGINE="wiredTiger"
MONGODB_JOURNALING="nojournal"
MONGODB_PORT="27017"
MONGODB_HOST="0.0.0.0"
MONGODB_MOUNTPOINT="/data/db"
```
```
$ docker run -e MONGODB_STORAGE_ENGINE="NEW ENGINE" -ti mongodb
```