-
Notifications
You must be signed in to change notification settings - Fork 86
/
Dockerfile
88 lines (82 loc) · 1.58 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
FROM alpine:3.20
ENV LIB_DEPS \
acl \
avahi \
avahi-compat-libdns_sd \
bash \
cups \
db \
dbus \
krb5 \
libevent \
libgcrypt \
libtracker \
linux-pam \
openldap \
talloc \
tracker \
tracker-miners \
tzdata
ENV BUILD_DEPS \
acl-dev \
avahi-dev \
bison \
cups-dev \
curl \
db-dev \
dbus-dev \
build-base \
flex \
gcc \
krb5-dev \
libevent-dev \
libgcrypt-dev \
linux-pam-dev \
meson \
ninja \
openldap-dev \
perl \
pkgconfig \
talloc-dev \
tracker-dev \
unicode-character-database
RUN apk update \
&& apk add --no-cache \
$LIB_DEPS \
$BUILD_DEPS \
&& addgroup builder \
&& adduser \
--disabled-password \
--ingroup builder \
--no-create-home \
builder
WORKDIR /netatalk-code
COPY . .
RUN chown -R builder:builder . \
&& rm -rf build || true
USER builder
RUN meson setup build \
-Dwith-afpstats=false \
-Dwith-appletalk=true \
-Dwith-dbus-daemon-path=/usr/bin/dbus-daemon \
-Dwith-dbus-sysconf-path=/etc \
-Dwith-dtrace=false \
-Dwith-init-style=none \
-Dwith-manual=none \
-Dwith-quota=false \
-Dwith-tcp-wrappers=false \
&& meson compile -C build
USER root
RUN meson install -C build \
&& apk del $BUILD_DEPS \
&& rm -rf \
/netatalk-code \
/usr/local/include/atalk \
/var/tmp \
/tmp \
&& ln -sf /dev/stdout /var/log/afpd.log
WORKDIR /mnt
COPY contrib/shell_utils/docker-entrypoint.sh /entrypoint.sh
EXPOSE 548
VOLUME ["/mnt/afpshare", "/mnt/afpbackup"]
CMD ["/entrypoint.sh"]