This repository was archived by the owner on Aug 22, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM alpine:3.6
1+ FROM alpine:3.7
22
3- RUN apk add --no-cache mongodb
4- COPY ./scripts/start.sh /
3+ LABEL MAINTAINER="Aurelien PERRIER <a.perrier89@gmail.com>"
4+ LABEL APP="mongodb"
5+ LABEL APP_VERSION="3.4.10-r0"
6+ LABEL APP_REPOSITORY="https://pkgs.alpinelinux.org/package/edge/community/x86_64/mongodb"
7+
8+ ENV TIMEZONE Europe/Paris
9+
10+ # Installing dependencies
11+ RUN apk add --no-cache mongodb su-exec
12+ RUN mkdir -p /data/db
13+
14+ WORKDIR /scripts
15+
16+ COPY ./scripts/start.sh start.sh
517
618VOLUME [ "/data/db" ]
719
820EXPOSE 27017 28017
921
10- ENTRYPOINT [ "./start.sh" ]
11- CMD [ "mongod" ]
22+ ENTRYPOINT [ "./start.sh" ]
Original file line number Diff line number Diff line change 1- # alpine-mongodb
1+ # Minio
2+
3+ ## Versions
4+
5+ Alpine : ` 3.7 `
6+ MongoDB : ` 3.4.10-r0 `
7+
8+ ## Commands
9+
10+ ** Pull :** ` docker pull perriea/alpine-mongodb:3.7 `
11+ ** Run :** ` docker run -d -p 27017:27017 -p 28017:28017 perriea/alpine-mongodb:3.7 `
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- # Docker entrypoint (pid 1), run as root
4- [ " $1 " = " mongod" ] || exec " $@ " || exit $?
5-
6- # Make sure that database is owned by user mongodb
7- [ " $( stat -c %U /data/db) " = mongodb ] || chown -R mongodb /data/db
8-
9- # Drop root privilege (no way back), exec provided command as user mongodb
10- cmd=exec; for i; do cmd=" $cmd '$i '" ; done
11- exec su -s /bin/sh -c " $cmd " mongodb
3+ chown -R mongodb:mongodb /data
4+ exec su-exec mongodb mongod --dbpath /data/db
You can’t perform that action at this time.
0 commit comments