summaryrefslogtreecommitdiff
path: root/packaging/docker/catlfish-merge/Dockerfile
blob: 668ee0c141b3a2c7c231ac43eb2ae876acb4310d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Docker file for catlfish merge.
#
# $ docker run \
#	-v /etc/catlfish:/usr/local/etc/catlfish \
#	-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/

# We run from /var/run/catlfish.
RUN mkdir /var/run/catlfish
RUN chgrp daemon /var/run/catlfish
RUN chmod 775 /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"]