-
Notifications
You must be signed in to change notification settings - Fork 87
/
Dockerfile
88 lines (75 loc) · 1.51 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
ARG RUN_DEPS="\
acl \
avahi \
avahi-compat-libdns_sd \
bash \
cups \
db \
dbus \
krb5 \
libevent \
libgcrypt \
libtracker \
linux-pam \
openldap \
talloc \
tracker \
tracker-miners \
tzdata"
ARG BUILD_DEPS="\
acl-dev \
avahi-dev \
bison \
cups-dev \
db-dev \
dbus-dev \
build-base \
flex \
gcc \
krb5-dev \
libevent-dev \
libgcrypt-dev \
linux-pam-dev \
meson \
ninja \
openldap-dev \
pkgconfig \
talloc-dev \
tracker-dev"
FROM alpine:3.20 AS build
ARG RUN_DEPS
ARG BUILD_DEPS
ENV RUN_DEPS=$RUN_DEPS
ENV BUILD_DEPS=$BUILD_DEPS
RUN apk update \
&& apk add --no-cache \
$RUN_DEPS \
$BUILD_DEPS
WORKDIR /netatalk-code
COPY . .
RUN rm -rf build
RUN meson setup build \
-Dbuildtype=release \
-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
RUN meson install --destdir=/staging/ -C build
FROM alpine:3.20 AS deploy
ARG RUN_DEPS
ENV RUN_DEPS=$RUN_DEPS
COPY --from=build /staging/ /
RUN apk update \
&& apk add --no-cache $RUN_DEPS
RUN ln -sf /dev/stdout /var/log/afpd.log
COPY /contrib/shell_utils/docker-entrypoint.sh /entrypoint.sh
WORKDIR /mnt
EXPOSE 548
VOLUME ["/mnt/afpshare", "/mnt/afpbackup"]
CMD ["/entrypoint.sh"]