Created
November 19, 2021 17:10
-
-
Save alecs/2b8057ac22fae35c4473b769671bffa9 to your computer and use it in GitHub Desktop.
mongodb-dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.8 | |
LABEL maintainer "Alex Negulescu <alecs@sysops.ro>" | |
ENV MONGO_USERNAME root | |
ENV MONGO_PASSWORD password | |
RUN addgroup -S -g 9999 mongodb 2>/dev/null | |
RUN adduser -S -D -h /var/lib/mongodb -s /sbin/nologin -G mongodb -g mongodb -u 9999 mongodb 2>/dev/null | |
RUN apk update &&\ | |
apk upgrade &&\ | |
apk add --no-cache mongodb | |
COPY entrypoint.sh /entrypoint.sh | |
COPY mongod.conf /etc/mongod.conf | |
VOLUME /data/db /data/configdb | |
EXPOSE 27017 28017 | |
ENTRYPOINT ["/entrypoint.sh"] | |
CMD ["mongod", "--bind_ip_all"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment