Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 85 additions & 52 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,93 @@
FROM debian:jessie

LABEL MAINTAINER="[email protected]"

ENV NETATALK_VERSION 3.1.8

ENV DEPS="build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libtracker-sparql-1.0-dev libtracker-miner-1.0-dev file"
ENV BUILD_DEPS \
build-essential \
libevent-dev \
libssl-dev \
libgcrypt11-dev \
libkrb5-dev \
libpam0g-dev \
libwrap0-dev \
libdb-dev \
libtdb-dev \
libmysqlclient-dev \
libavahi-client-dev \
libacl1-dev \
libldap2-dev \
libcrack2-dev \
systemtap-sdt-dev \
libdbus-1-dev \
libdbus-glib-1-dev \
libglib2.0-dev \
libtracker-sparql-1.0-dev \
libtracker-miner-1.0-dev \
file

ENV PERSISTENT_RUNTIME_DEPS \
libevent-2.0 \
libavahi-client3 \
libevent-core-2.0 \
libwrap0 \
libtdb1 \
libmysqlclient18 \
libcrack2 \
libdbus-glib-1-2


ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install \
--no-install-recommends \
--fix-missing \
--assume-yes \
$DEPS \
tracker \
avahi-daemon \
curl wget \
&& wget "http://ufpr.dl.sourceforge.net/project/netatalk/netatalk/3.1.8/netatalk-3.1.8.tar.gz" \
&& curl -SL "http://ufpr.dl.sourceforge.net/project/netatalk/netatalk/3.1.8/netatalk-3.1.8.tar.gz" | tar xvz

WORKDIR netatalk-3.1.8

RUN ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-init-style=debian-systemd \
--without-libevent \
--without-tdb \
--with-cracklib \
--enable-krbV-uam \
--with-pam-confdir=/etc/pam.d \
--with-dbus-sysconf-dir=/etc/dbus-1/system.d \
--with-tracker-pkgconfig-version=1.0 \
&& make \
&& make install \
&& apt-get --quiet --yes purge --auto-remove \
$DEPS \
tracker-gui \
libgl1-mesa-dri \
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libevent-2.0 \
libavahi-client3 \
libevent-core-2.0 \
libwrap0 \
libtdb1 \
libmysqlclient18 \
libcrack2 \
libdbus-glib-1-2 \

RUN apt-get update \
&& apt-get install \
--no-install-recommends \
--fix-missing \
--assume-yes \
$BUILD_DEPS \
tracker \
avahi-daemon \
curl \
\
&& curl -sSL http://ufpr.dl.sourceforge.net/project/netatalk/netatalk/${NETATALK_VERSION}/netatalk-${NETATALK_VERSION}.tar.gz -O \
&& tar fxvz netatalk-${NETATALK_VERSION}.tar.gz \
&& cd netatalk-${NETATALK_VERSION} \
\
&& ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-init-style=debian-systemd \
--without-libevent \
--without-tdb \
--with-cracklib \
--enable-krbV-uam \
--with-pam-confdir=/etc/pam.d \
--with-dbus-sysconf-dir=/etc/dbus-1/system.d \
--with-tracker-pkgconfig-version=1.0 \
&& make -j "$(nproc)" \
&& make install \
\
&& apt-get --quiet --yes purge --auto-remove \
$BUILD_DEPS \
tracker-gui \
libgl1-mesa-dri \
\
&& apt-get install --yes $PERSISTENT_RUNTIME_DEPS \
\
&& apt-get --quiet --yes autoclean \
&& apt-get --quiet --yes autoremove \
&& apt-get --quiet --yes clean \
&& rm -rf /netatalk* \
&& rm -rf /usr/share/man \
&& rm -rf /usr/share/doc \
&& rm -rf /usr/share/icons \
&& rm -rf /usr/share/poppler \
&& rm -rf /usr/share/mime \
&& rm -rf /usr/share/GeoIP \
&& rm -rf /var/lib/apt/lists* \
&& mkdir /media/share
&& apt-get --quiet --yes autoremove \
&& apt-get --quiet --yes clean \
&& cd / \
&& rm -rf netatalk-${NETATALK_VERSION} \
&& rm -rf /usr/share/man \
&& rm -rf /usr/share/doc \
&& rm -rf /usr/share/icons \
&& rm -rf /usr/share/poppler \
&& rm -rf /usr/share/mime \
&& rm -rf /usr/share/GeoIP \
&& rm -rf /var/lib/apt/lists* \
&& mkdir -p /media/share

COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY afp.conf /etc/afp.conf
Expand Down