-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
74 lines (68 loc) · 1.92 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
FROM alpine:3.10
LABEL maintainer="Yuki git@48763 <[email protected]>"
ENV NETATALK_VERSION 3.1.12
RUN set -x \
&& tempDir="$(mktemp -d)" \
&& netatalkPackages=" \
db \
libacl \
tdb-libs \
libattr \
libevent \
libgcrypt \
" \
&& cd ${tempDir} \
&& wget https://nchc.dl.sourceforge.net/project/netatalk/netatalk/${NETATALK_VERSION}/netatalk-${NETATALK_VERSION}.tar.gz \
&& tar xf netatalk-${NETATALK_VERSION}.tar.gz \
&& cd netatalk-${NETATALK_VERSION} \
&& apk add --no-cache --virtual .build-deps \
make \
gcc \
libc-dev \
acl-dev \
attr-dev \
db-dev \
libevent-dev \
libgcrypt-dev \
tdb-dev \
file \
&& ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--disable-silent-rules \
--disable-zeroconf \
--disable-tcp-wrappers \
--enable-overwrite \
--without-libiconv \
--without-pam \
--with-shadow \
--without-kerberos \
--without-ldap \
--with-acls \
--without-libevent \
--with-libevent-header=/usr/include \
--with-libevent-lib=/usr/lib \
--with-bdb=/usr \
--without-tdb \
--without-dtrace \
--without-afpstats \
--with-lockfile=/var/lock/netatalk \
&& make \
&& make install \
&& cd ${tempDir}/.. \
&& rm -rf ${tempDir} \
&& apk del .build-deps \
&& apk add --no-cache $netatalkPackages \
&& mkdir -p \
/data/share-folder \
/data/time-machine \
&& chmod 770 $(find /data/ -type d) \
&& chgrp -R 1000 /data
COPY ["afp.conf", "/etc/afp.conf"]
COPY ["entrypoint.sh", "/etc/entrypoint.sh"]
EXPOSE 548 4700
CMD ["sh", "/etc/entrypoint.sh", "netatalk", "-d"]