-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·41 lines (34 loc) · 964 Bytes
/
Dockerfile
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
FROM alpine:3.20.3
ENV PATH="/container/scripts:${PATH}"
RUN export rsync_version=3.3.0 \
\
&& apk add --no-cache alpine-sdk \
bash \
openssl-dev \
lz4-dev \
zstd-dev \
xxhash-dev \
\
&& wget https://download.samba.org/pub/rsync/src/rsync-${rsync_version}.tar.gz \
&& tar xvf rsync-${rsync_version}.tar.gz \
&& rm rsync-${rsync_version}.tar.gz \
&& cd rsync-${rsync_version} \
\
&& ./configure --prefix=/ \
&& make \
&& make install \
\
&& cd - \
&& rm -rf rsync-${rsync_version} \
\
&& apk del alpine-sdk \
\
&& touch /etc/rsyncd.secrets \
&& chmod 600 /etc/rsyncd.secrets
VOLUME ["/shares"]
EXPOSE 873
COPY . /container/
RUN cp /container/config/rsyncd.conf /etc/rsyncd.conf
HEALTHCHECK CMD ["docker-healthcheck.sh"]
ENTRYPOINT ["entrypoint.sh"]
CMD [ "rsync", "--no-detach", "--daemon", "--config", "/etc/rsyncd.conf" ]