FROM mongo:3.4.9

MAINTAINER Cloud CMS <support@cloudcms.com>

# update
RUN apt-get update
RUN apt-get install sudo

# disable transparent huge pages for production Mongo DB
# https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/
COPY disable-transparent-hugepages /etc/init.d
RUN sudo chmod 755 /etc/init.d/disable-transparent-hugepages
RUN sudo update-rc.d disable-transparent-hugepages defaults

COPY mongod.conf /etc/mongod.conf