This repository was archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (49 loc) · 2.29 KB
/
Dockerfile
File metadata and controls
62 lines (49 loc) · 2.29 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM alpine
MAINTAINER Mickaël Perrin <dev@mickaelperrin.fr>
# Add edge repos
RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories; \
echo "@edgecommunity http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
echo "@edgetesting http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
ARG PYYAML_VERSION=5.3.1
RUN apk update \
&& apk add --no-cache --upgrade apk-tools@edgetesting \
&& apk add --no-cache shadow@edgetesting supervisor bash curl python3 \
&& curl -L http://pyyaml.org/download/pyyaml/PyYAML-${PYYAML_VERSION}.tar.gz | tar zxv -C /tmp \
&& cd /tmp/PyYAML-${PYYAML_VERSION} \
&& python3 setup.py --without-libyaml install \
&& apk del curl
ARG UNISON_VERSION=2.51.2
# Compile unison from source with inotify support and removes compilation tools
RUN apk add --no-cache --virtual .build-dependencies build-base curl \
&& apk add --no-cache inotify-tools \
&& apk add --no-cache ocaml \
&& curl -L https://github.com/bcpierce00/unison/archive/v$UNISON_VERSION.tar.gz | tar zxv -C /tmp \
&& cd /tmp/unison-${UNISON_VERSION} \
&& sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c \
&& make UISTYLE=text NATIVE=true STATIC=true \
&& cp src/unison src/unison-fsmonitor /usr/local/bin \
&& apk del .build-dependencies ocaml \
&& rm -rf /tmp/unison-${UNISON_VERSION}
ENV DOCKERGEN_VERSION=0.8.0
# Install docker-gen (to grab docker config on start)
RUN apk add --no-cache curl \
&& curl -L https://github.com/jwilder/docker-gen/releases/download/$DOCKERGEN_VERSION/docker-gen-linux-amd64-$DOCKERGEN_VERSION.tar.gz | tar -C /usr/local/bin -xzv \
&& apk del curl
# Install supervisord-stdout
RUN apk add --no-cache py-pip git \
&& pip install git+https://github.com/coderanger/supervisor-stdout \
&& apk del py-pip gitch
# Install entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN mkdir -p /sync-entrypoint.d \
&& chmod +x /entrypoint.sh \
&& mkdir -p /etc/supervisor.conf.d
COPY volumes.tmpl /volumes.tmpl
COPY config_sync.py /config_sync.py
COPY supervisord.conf /etc/supervisord.conf
COPY supervisor.unison.tpl.conf /etc/supervisor.unison.tpl.conf
ENV TZ="Europe/Paris" \
LANG="C.UTF-8"
ADD VERSION .
ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord"]