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

updated to stretch, used multistaged build #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
65 changes: 25 additions & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM debian:jessie
FROM debian:stretch AS builder
ENV NETATALK_VERSION 3.1.11

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 DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install \
--assume-yes \
apt-utils

ENV DEPS="build-essential dpkg-dev dh-make fakeroot libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev default-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"
RUN apt-get update \
&& apt-get install \
--no-install-recommends \
Expand All @@ -17,44 +22,24 @@ RUN apt-get update \

WORKDIR netatalk-${NETATALK_VERSION}

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 \
&& 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
RUN DEBFULLNAME="Instant User" DEBEMAIL="[email protected]" dh_make -s -c gpl3 --yes --createorig
ADD rules.add .
RUN cat rules.add >> debian/rules
RUN debian/rules binary

FROM debian:stretch

ENV NETATALK_VERSION 3.1.11
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install \
--assume-yes \
apt-utils

RUN mkdir /media/share

COPY --from=builder /netatalk_*.deb /
RUN dpkg --force-depends -i "/netatalk_${NETATALK_VERSION}-1_$(dpkg --print-architecture).deb" && apt-get install -f -y

COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY afp.conf /etc/afp.conf
Expand Down
4 changes: 4 additions & 0 deletions rules.add
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
override_dh_auto_configure:
dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --localstatedir=/var --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