Skip to content

Instantly share code, notes, and snippets.

@bonafernando
Created May 5, 2016 19:14
Show Gist options
  • Save bonafernando/ac78e105226ecdefeecf94f8a510a081 to your computer and use it in GitHub Desktop.
Save bonafernando/ac78e105226ecdefeecf94f8a510a081 to your computer and use it in GitHub Desktop.
Docker with MongoDB in a brand new Ubuntu 16.04
# Pull base image.
FROM ubuntu:16.04
MAINTAINER W.Bona Fernando <[email protected]>
MAINTAINER Agliardi, Douglas <[email protected]>
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
RUN echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
RUN apt-get update && apt-get install -y mongodb-org
RUN mkdir -p /data/mu
RUN mkdir -p /data/db
RUN systemctl unmask mongodb
EXPOSE 27017
ENTRYPOINT ["/usr/bin/mongod"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment