Skip to content

Commit 8fa7d23

Browse files
committed
Added basic version of Dockerfile and configuration files.
1 parent 4982b28 commit 8fa7d23

File tree

4 files changed

+164
-0
lines changed

4 files changed

+164
-0
lines changed

.gitignore

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#######################
2+
## Windows gitignore ##
3+
#######################
4+
# Windows image file caches
5+
Thumbs.db
6+
ehthumbs.db
7+
8+
# Folder config file
9+
Desktop.ini
10+
11+
# Recycle Bin used on file shares
12+
$RECYCLE.BIN/
13+
14+
# Windows Installer files
15+
*.cab
16+
*.msi
17+
*.msm
18+
*.msp
19+
20+
# Windows shortcuts
21+
*.lnk
22+
23+
###################
24+
## OSX gitignore ##
25+
###################
26+
.DS_Store
27+
.AppleDouble
28+
.LSOverride
29+
30+
# Icon must end with two \r
31+
Icon
32+
33+
# Thumbnails
34+
._*
35+
36+
# Files that might appear on external disk
37+
.Spotlight-V100
38+
.Trashes
39+
40+
# Directories potentially created on remote AFP share
41+
.AppleDB
42+
.AppleDesktop
43+
Network Trash Folder
44+
Temporary Items
45+
.apdisk
46+
47+
#####################
48+
## Linux gitginore ##
49+
#####################
50+
51+
*~
52+
53+
# KDE directory preferences
54+
.directory
55+
56+
#######################
57+
## Sublime gitignore ##
58+
#######################
59+
60+
# cache files for sublime text
61+
*.tmlanguage.cache
62+
*.tmPreferences.cache
63+
*.stTheme.cache
64+
65+
# workspace files are user-specific
66+
*.sublime-workspace
67+
68+
# project files should be checked into the repository, unless a significant
69+
# proportion of contributors will probably not be using SublimeText
70+
*.sublime-project
71+
72+
# sftp configuration file
73+
sftp-config.json

Dockerfile

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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" ]

afp.conf

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Global]
2+
log file = /var/log/afpd.log
3+
log level = default:warn
4+
5+
[TimeMachine]
6+
path = /timemachine
7+
time machine = yes
8+
valid users = @timemachine

start_services.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
service avahi-daemon start
3+
service netatalk start

0 commit comments

Comments
 (0)