FROM ubuntu:14.04 RUN \ apt-get update && \ apt-get install -y wget && \ cd /opt && \ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.4.tgz && \ tar xzf mongodb-linux-x86_64-3.0.4.tgz && \ rm -f mongodb-linux-x86_64-3.0.4.tgz && \ mv mongodb-linux-x86_64-3.0.4 mongodb COPY ./mongod.conf /opt/mongodb/mongod.conf VOLUME ["/var/lib/mongodb"] WORKDIR /var/lib/mongodb CMD ["/opt/mongodb/bin/mongod", "--config", "/opt/mongodb/mongod.conf"] EXPOSE 27017 EXPOSE 28017