Skip to content

Instantly share code, notes, and snippets.

@jschneiderhan
Created January 20, 2014 20:17
Show Gist options
  • Save jschneiderhan/8528201 to your computer and use it in GitHub Desktop.
Save jschneiderhan/8528201 to your computer and use it in GitHub Desktop.
Dockerfile for compiling mongo from source with ssl support
FROM ubuntu:12.04
MAINTAINER operations@meyouhealth.com
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y git-core build-essential scons openssl libssl-dev && rm -rf /var/cache/apt/archives/* # trying to reduce the size of the image
RUN mkdir /tmp/mongodb && cd /tmp/mongodb && git clone git://github.com/mongodb/mongo.git /tmp/mongodb && git checkout r2.4.6 && cd /tmp/mongodb && scons install -j $(( $(nproc) * 2)) --64 --ssl && rm -rf /tmp/mongodb # again combining commands and removing source files to reduce the size of the image
RUN mkdir -p /data/db
EXPOSE 27017
ENTRYPOINT ["/usr/local/bin/mongod"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment