aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-08-17 07:36:31 +0000
committerSam Yaple <sam@yaple.net>2015-08-17 07:38:59 +0000
commitcfe6d6200d503bfb1ace77dec05b835d7b4aab94 (patch)
treeaaf0d6dc4654d4f4783e1e0ddf7e4c2156c8af71
parent9bd3ea7207c08971bc604b2d1a99bfa431780c02 (diff)
downloadkolla-cfe6d6200d503bfb1ace77dec05b835d7b4aab94.tar.gz
kolla-cfe6d6200d503bfb1ace77dec05b835d7b4aab94.zip
Add mongodb to docker_templates
Change-Id: I0adbc986f02b22c90019b76784153a9accac663f Partially-Implements: blueprint dockerfile-template
-rw-r--r--docker_templates/mongodb/Dockerfile.j223
1 files changed, 23 insertions, 0 deletions
diff --git a/docker_templates/mongodb/Dockerfile.j2 b/docker_templates/mongodb/Dockerfile.j2
new file mode 100644
index 000000000..91e880007
--- /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