summaryrefslogtreecommitdiff
path: root/packaging/docker/catlfish-merge/Dockerfile
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-01 22:14:13 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-03 16:48:59 +0200
commit352ade3dfb4890c40f17ebff2cfc55c21e8de20e (patch)
treecf5b10685c93a6c6471eda3e55e40d5b7ea60885 /packaging/docker/catlfish-merge/Dockerfile
parent4860fff216892010a997547b0fa19cd4505cb804 (diff)
[Docker] Add docker support for merge nodes.
Also, run as a separate user in docker-dev.
Diffstat (limited to 'packaging/docker/catlfish-merge/Dockerfile')
-rw-r--r--packaging/docker/catlfish-merge/Dockerfile41
1 files changed, 41 insertions, 0 deletions
diff --git a/packaging/docker/catlfish-merge/Dockerfile b/packaging/docker/catlfish-merge/Dockerfile
new file mode 100644
index 0000000..cf6fa7a
--- /dev/null
+++ b/packaging/docker/catlfish-merge/Dockerfile
@@ -0,0 +1,41 @@
+# Docker file for catlfish merge.
+#
+# NOTE: The directory on the host system that's mounted at
+# /var/local/db/catlfish-merge in the container has to be writable by
+# a host user with uid 147.
+#
+# $ docker run \
+# -v /etc/catlfish:/usr/local/etc/catlfish:ro \
+# -v /var/local/db/catlfish-merge:/var/local/db/catlfish-merge \
+# catlfish-merge
+
+FROM base
+RUN apt-get update
+RUN echo 'debconf debconf/frontend select noninteractive' | debconf-set-selections
+RUN apt-get -y -q install git python-ecdsa python-yaml
+
+WORKDIR /usr/local/src
+RUN git clone https://git.nordu.net/catlfish.git
+
+# Config dir and database dir are mounted from host using `-v' to
+# 'docker run'.
+VOLUME /usr/local/etc/catlfish
+VOLUME /var/local/db/catlfish-merge
+
+# Copy merge.sh.
+RUN mkdir -p /usr/local/catlfish/bin
+ADD merge.sh /usr/local/catlfish/bin/
+
+# Create a catlfish user.
+RUN groupadd --gid 147 catlfish
+RUN useradd --uid 147 --gid 147 catlfish
+
+# We run from /var/run/catlfish.
+RUN mkdir -p /var/run/catlfish/supervisord_log
+RUN chown -R catlfish:catlfish /var/run/catlfish
+WORKDIR /var/run/catlfish
+
+# Run supervisord.
+ADD supervisord.conf /etc/supervisor/
+USER catlfish
+CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]