-
Notifications
You must be signed in to change notification settings - Fork 105
/
Dockerfile
89 lines (79 loc) · 2.1 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM alpine:latest
LABEL maintainer="Óscar de Arriba <[email protected]>"
##################
## BUILDING ##
##################
# Versions to use
ENV netatalk_version 3.1.12
WORKDIR /
# Prerequisites
RUN apk update && \
apk upgrade && \
apk add --no-cache \
bash \
curl \
libldap \
libgcrypt \
python3 \
dbus \
dbus-glib \
py-dbus \
linux-pam \
cracklib \
db \
libevent \
file \
tzdata \
acl \
openssl \
supervisor && \
apk add --no-cache --virtual .build-deps \
build-base \
autoconf \
automake \
libtool \
libgcrypt-dev \
linux-pam-dev \
cracklib-dev \
acl-dev \
db-dev \
dbus-dev \
libevent-dev && \
ln -s -f /bin/true /usr/bin/chfn && \
cd /tmp && \
curl -o netatalk-${netatalk_version}.tar.gz -L https://downloads.sourceforge.net/project/netatalk/netatalk/${netatalk_version}/netatalk-${netatalk_version}.tar.gz && \
tar xvf netatalk-${netatalk_version}.tar.gz && \
cd netatalk-${netatalk_version} && \
CFLAGS="-Wno-unused-result -O2" ./configure \
--prefix=/usr \
--localstatedir=/var/state \
--sysconfdir=/etc \
--with-dbus-sysconf-dir=/etc/dbus-1/system.d/ \
--with-init-style=debian-sysv \
--sbindir=/usr/bin \
--enable-quota \
--with-tdb \
--enable-silent-rules \
--with-cracklib \
--with-cnid-cdb-backend \
--enable-pgp-uam \
--with-acls && \
make && \
make install && \
cd /tmp && \
rm -rf netatalk-${netatalk_version} netatalk-${netatalk_version}.tar.gz && \
apk del .build-deps
RUN mkdir -p /timemachine && \
mkdir -p /var/log/supervisor && \
mkdir -p /conf.d/netatalk
# Create the log file
RUN touch /var/log/afpd.log
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ADD start_netatalk.sh /start_netatalk.sh
ADD bin/add-account /usr/bin/add-account
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD afp.conf /etc/afp.conf
EXPOSE 548 636
VOLUME ["/timemachine"]
CMD ["/entrypoint.sh"]