summaryrefslogtreecommitdiff
path: root/packaging/docker/catlfish-dev/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/docker/catlfish-dev/Dockerfile')
-rw-r--r--packaging/docker/catlfish-dev/Dockerfile15
1 files changed, 10 insertions, 5 deletions
diff --git a/packaging/docker/catlfish-dev/Dockerfile b/packaging/docker/catlfish-dev/Dockerfile
index b3d19cb..9a95417 100644
--- a/packaging/docker/catlfish-dev/Dockerfile
+++ b/packaging/docker/catlfish-dev/Dockerfile
@@ -43,10 +43,15 @@ RUN make -C catlfish PREFIX=/usr/local/catlfish release
VOLUME /usr/local/catlfish
VOLUME /var/local/db/catlfish
-# Working directory is where catlfish.config is.
-WORKDIR /usr/local/etc/catlfish
+# Working directory is where catlfish.config is. We want to run in
+# /var/run/catlfish and not in /usr/local/etc/catlfish, so symlink.
+RUN mkdir /var/run/catlfish
+RUN ln -s /usr/local/etc/catlfish/catlfish.config /var/run/catlfish/
+WORKDIR /var/run/catlfish
-# Run supervisord. TODO: make log- and pidfile end up in
-# /var/run/catlfish
+# Don't run as root.
+USER daemon
+
+# Run supervisord.
ADD supervisord.conf /etc/supervisor/
-CMD ["/usr/bin/supervisord"]
+CMD ["/usr/bin/supervisord" "-c" "/etc/supervisor/supervisord.conf"]