From f895fc7472adc8270585a45f800df47d0e2d2ab3 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Thu, 2 Apr 2015 11:40:56 +0200 Subject: docker moar --- packaging/docker/catlfish-dev/Dockerfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'packaging/docker/catlfish-dev/Dockerfile') diff --git a/packaging/docker/catlfish-dev/Dockerfile b/packaging/docker/catlfish-dev/Dockerfile index c9cf96c..5d0004a 100644 --- a/packaging/docker/catlfish-dev/Dockerfile +++ b/packaging/docker/catlfish-dev/Dockerfile @@ -3,7 +3,11 @@ # /usr/local/etc/catlfish is recommended. This can be done using the # `-v' flag to `docker run'. Example: -# $ docker run -v /etc/catlfish:/usr/local/etc/catlfish catlfish +# NOTE: The directory on the host system that's mounted at +# /var/local/db/catlfish in the container has to be writable by a host +# user with uid 147. + +# $ docker run -v /etc/catlfish:/usr/local/etc/catlfish:ro catlfish FROM erlang RUN apt-get update @@ -45,17 +49,17 @@ VOLUME /var/local/db/catlfish RUN chgrp daemon /var/local/db/catlfish RUN chmod 775 /var/local/db/catlfish -# Working directory is where catlfish.config is. We want to run in +# Don't run as root. +RUN useradd --uid 147 catlfish +USER catlfish + +# Working has to be where catlfish.config is. We want to run in # /var/run/catlfish and not in /usr/local/etc/catlfish, so symlink. RUN mkdir -p /var/run/catlfish/erlang_log /var/run/catlfish/sasl_log -RUN chgrp -R daemon /var/run/catlfish -RUN chmod -R 775 /var/run/catlfish +RUN chown -R catlfish /var/run/catlfish RUN ln -s /usr/local/etc/catlfish/catlfish.config /var/run/catlfish/ WORKDIR /var/run/catlfish -# Don't run as root. -USER daemon - # Run supervisord. ADD supervisord.conf /etc/supervisor/ CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] -- cgit v1.1