From cfe6d6200d503bfb1ace77dec05b835d7b4aab94 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Mon, 17 Aug 2015 07:36:31 +0000 Subject: [PATCH] Add mongodb to docker_templates Change-Id: I0adbc986f02b22c90019b76784153a9accac663f Partially-Implements: blueprint dockerfile-template --- docker_templates/mongodb/Dockerfile.j2 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docker_templates/mongodb/Dockerfile.j2 diff --git a/docker_templates/mongodb/Dockerfile.j2 b/docker_templates/mongodb/Dockerfile.j2 new file mode 100644 index 0000000000..91e8800074 --- /dev/null +++ b/docker_templates/mongodb/Dockerfile.j2 @@ -0,0 +1,23 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + mongodb \ + mongodb-server \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +RUN mkdir -p /data/db + +VOLUME /data/db +VOLUME /var/log/mongodb + +ENTRYPOINT exec /bin/mongod --dbpath /data/db --logpath /var/log/mongodb/mongo.log --noprealloc --smallfiles