encrypted mongoDB end of Dockerfile

Home   »   encrypted mongoDB end of Dockerfile

COPY ./db-config/docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]

EXPOSE 27017

WORKDIR /db-config

COPY ./db-config .

RUN chmod 600 ./init-db-users.sh
RUN chmod 600 mongodb-keyfile
RUN chmod 600 mongodb-keyfile
RUN chown 999:999 mongodb-keyfile

CMD ["mongod", "--auth", "--enableEncryption", "--encryptionKeyFile", "/db-config/mongodb-keyfile"]

Leave a Reply

Your email address will not be published. Required fields are marked *