Last active
October 10, 2019 23:10
-
-
Save markllama/829690622aacee395836 to your computer and use it in GitHub Desktop.
A Dockerfile for a MongoDB container based on Fedora 20
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 fedora:20 | |
MAINTAINER Mark Lamourine <[email protected]> | |
#COMMENT { "description": "mongodb service container", \ | |
# "usage": "docker run -d -p 27017:27017 --name mongodb mlamouri/mongodb --volume=/mydbdatadir:/var/lib/mongodb" } | |
RUN yum install -y mongodb-server && yum clean all | |
RUN mkdir -p /var/lib/mongodb && \ | |
touch /var/lib/mongodb/.keep && \ | |
chown -R mongodb:mongodb /var/lib/mongodb | |
ADD mongodb.conf /etc/mongodb.conf | |
VOLUME [ "/var/lib/mongodb" ] | |
EXPOSE 27017 | |
USER mongodb | |
WORKDIR /var/lib/mongodb | |
ENTRYPOINT ["/usr/bin/mongod", "--config", "/etc/mongodb.conf"] | |
CMD ["--quiet"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment