From 662d02f6aea6d9aee747e00d32edd116b8757913 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 20 Aug 2018 12:44:58 +0100 Subject: [PATCH] rebase to alpine 3.8 --- Dockerfile | 21 ++++++++++----------- root/etc/cont-init.d/30-dbus | 6 ++++++ root/etc/services.d/forked/run | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8e25a8..cd42b83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM lsiobase/alpine:3.7 as buildstage +FROM lsiobase/alpine:3.8 as buildstage ############## build stage ############## RUN \ echo "**** install build packages ****" && \ - apk add --no-cache --virtual=build-dependencies \ + apk add --no-cache \ alsa-lib-dev \ autoconf \ automake \ @@ -27,18 +27,18 @@ RUN \ libgcrypt-dev \ libogg-dev \ libplist-dev \ + libressl-dev \ libsodium-dev \ libtool \ libunistring-dev \ libwebsockets-dev \ make \ openjdk8-jre-base \ - openssl-dev \ protobuf-c-dev \ sqlite-dev \ taglib-dev \ tar && \ - apk add --no-cache --virtual=build-dependencies \ + apk add --no-cache \ --repository http://nl.alpinelinux.org/alpine/edge/testing \ libantlr3c-dev \ mxml-dev && \ @@ -74,13 +74,13 @@ RUN \ --infodir=/usr/share/info \ --localstatedir=/var \ --mandir=/usr/share/man \ - --prefix=/app \ + --prefix=/usr \ --sysconfdir=/etc && \ make && \ - make install - + make DESTDIR=/tmp/daapd-build install && \ + mv /tmp/daapd-build/etc/forked-daapd.conf /tmp/daapd-build/etc/forked-daapd.conf.orig ############## runtime stage ############## -FROM lsiobase/alpine:3.7 +FROM lsiobase/alpine:3.8 # set version label ARG BUILD_DATE @@ -100,10 +100,10 @@ RUN \ libevent \ libgcrypt \ libplist \ + libressl \ libsodium \ libunistring \ libwebsockets \ - openssl \ protobuf-c \ sqlite \ sqlite-libs && \ @@ -113,8 +113,7 @@ RUN \ mxml # copy buildstage and local files -COPY --from=buildstage /etc/forked-daapd.conf /etc/forked-daapd.conf.orig -COPY --from=buildstage /app/ app/ +COPY --from=buildstage /tmp/daapd-build/ / COPY root/ / # ports and volumes diff --git a/root/etc/cont-init.d/30-dbus b/root/etc/cont-init.d/30-dbus index b91e426..7717944 100644 --- a/root/etc/cont-init.d/30-dbus +++ b/root/etc/cont-init.d/30-dbus @@ -1,7 +1,13 @@ #!/usr/bin/with-contenv bash +# make our folders +mkdir -p \ + /var/run/dbus + + [[ -e /var/run/dbus.pid ]] && \ rm -f /var/run/dbus.pid dbus-uuidgen --ensure sleep 1 + diff --git a/root/etc/services.d/forked/run b/root/etc/services.d/forked/run index 920a348..f9153e4 100644 --- a/root/etc/services.d/forked/run +++ b/root/etc/services.d/forked/run @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc /app/sbin/forked-daapd -f \ + s6-setuidgid abc /usr/sbin/forked-daapd -f \ -P /daapd-pidfolder/forked-daapd.pid