Created
August 12, 2019 12:09
-
-
Save milnomada/2af8ad20c1f273258d98ac9b66cb1485 to your computer and use it in GitHub Desktop.
A working version of the dockerized mongodb v3.4
This file contains hidden or 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 debian:jessie-slim | |
RUN apt-get update && \ | |
apt-get install -y ca-certificates && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0C49F3730359A14518585931BC711F9BA15703C6 && \ | |
gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/mongodb.gpg | |
ARG MONGO_PACKAGE=mongodb-org | |
ARG MONGO_REPO=repo.mongodb.org | |
ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO} | |
ENV MONGO_MAJOR 3.4 | |
ENV MONGO_VERSION 3.4.18 | |
RUN echo "deb http://$MONGO_REPO/apt/debian jessie/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR main" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" | |
RUN echo "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" | |
RUN apt-get update | |
RUN apt-get install -y ${MONGO_PACKAGE}=$MONGO_VERSION | |
VOLUME ["/data/db"] | |
WORKDIR /data | |
EXPOSE 27017 | |
CMD ["mongod", "--smallfiles"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment