Last active
September 4, 2015 02:03
-
-
Save Wei1234c/0a4722287700cfa0350c 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
# MongoDB Dockerfile | |
# https://github.com/dockerfile/mongodb | |
# | |
# origin: https://raw.githubusercontent.com/dockerfile/mongodb/master/Dockerfile | |
# modified by: Wei Lin | |
# date: 2015/9/3 | |
# Pull base image. | |
FROM armv7/armhf-ubuntu:14.04 | |
MAINTAINER Wei Lin | |
ENV TERM linux | |
# Install MongoDB. | |
RUN apt-get update && \ | |
apt-get install -y mongodb | |
# RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 && \ | |
# echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' > /etc/apt/sources.list.d/mongodb.list && \ | |
# apt-get update && \ | |
# apt-get install -y mongodb-org mongodb mongodb-clients mongodb-dev mongodb-server | |
# Upgrade and clean up | |
RUN apt-get dist-upgrade -y && \ | |
apt-get autoremove -y && \ | |
apt-get autoclean -y && \ | |
apt-get clean -y && \ | |
rm -rf /var/lib/apt/lists/* | |
# Environment variables | |
RUN echo " " >> /etc/bash.bashrc && \ | |
echo "#_____________________" >> /etc/bash.bashrc && \ | |
echo "force_color_prompt=yes" >> /etc/bash.bashrc && \ | |
echo "alias cls='clear'" >> /etc/bash.bashrc && \ | |
echo "export TERM=linux" >> /etc/bash.bashrc | |
# Define mountable directories. | |
VOLUME ["/data/db"] | |
# Define working directory. | |
WORKDIR /data | |
# Expose ports. | |
# - 27017: process | |
# - 28017: http | |
EXPOSE 27017 | |
EXPOSE 28017 | |
# Define default command. | |
CMD ["mongod"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment