1
+ FROM ubuntu:14.04
2
+ MAINTAINER Óscar de Arriba <
[email protected] >
3
+
4
+ # #################
5
+ # # BUILDING ##
6
+ # #################
7
+
8
+ # Prerequisites
9
+ RUN apt-get update
10
+ ENV DEBIAN_FRONTEND noninteractive
11
+ RUN ln -s -f /bin/true /usr/bin/chfn
12
+
13
+ # Versions to use
14
+ ENV libevent_version 2.0.22-stable
15
+ ENV netatalk_version 3.1.7
16
+
17
+ # Install prerequisites:
18
+ RUN apt-get -y install build-essential wget pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.3-dev db-util db5.3-util libgcrypt11 libgcrypt11-dev libtdb-dev
19
+
20
+ # Compiling libevent
21
+ WORKDIR /usr/local/src
22
+ RUN wget https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-${libevent_version}.tar.gz
23
+ RUN tar xfv libevent-${libevent_version}.tar.gz
24
+
25
+ WORKDIR libevent-${libevent_version}
26
+ RUN ./configure
27
+ RUN make
28
+ RUN checkinstall \
29
+ --pkgname=libevent-${libevent_version} \
30
+ --pkgversion=${libevent_version} \
31
+ --backup=no \
32
+ --deldoc=yes \
33
+ --default --fstrans=no
34
+
35
+ # Compiling netatalk
36
+ WORKDIR /usr/local/src
37
+ RUN git clone git://git.code.sf.net/p/netatalk/code netatalk-code
38
+
39
+ WORKDIR netatalk-code
40
+ RUN git checkout netatalk-${netatalk_version}
41
+ RUN ./bootstrap
42
+ RUN ./configure \
43
+ --enable-debian \
44
+ --enable-krbV-uam \
45
+ --enable-zeroconf \
46
+ --enable-krbV-uam \
47
+ --enable-tcp-wrappers \
48
+ --with-cracklib \
49
+ --with-acls \
50
+ --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
51
+ --with-init-style=debian-sysv \
52
+ --with-pam-confdir=/etc/pam.d \
53
+ --with-tracker-pkgconfig-version=0.16
54
+ RUN make
55
+ RUN checkinstall \
56
+ --pkgname=netatalk \
57
+ --pkgversion=$netatalk_version \
58
+ --backup=no \
59
+ --deldoc=yes \
60
+ --default \
61
+ --fstrans=no
62
+
63
+ # Add default user and group
64
+ RUN groupadd timemachine
65
+ RUN useradd timemachine -m -G timemachine -p 13yb934i7yfb
66
+
67
+ # Assign permissions
68
+ RUN chown timemachine:timemachine /timemachine
69
+
70
+ # Create the log file
71
+ RUN touch /var/log/afpd.log
72
+
73
+ ADD afp.conf /usr/local/etc/afp.conf
74
+ ADD start_services.sh /start_services.sh
75
+
76
+ EXPOSE 548
77
+
78
+ VOLUME ["/timemachine" ]
79
+
80
+ CMD [ "/bin/bash" , "/start.sh" ]
0 commit comments