diff --git a/Dockerfile b/Dockerfile index d4147d9..f8e25a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,5 @@ -FROM lsiobase/alpine:3.7 - -# set version label -ARG BUILD_DATE -ARG VERSION -LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="sparklyballs" +FROM lsiobase/alpine:3.7 as buildstage +############## build stage ############## RUN \ echo "**** install build packages ****" && \ @@ -35,8 +30,10 @@ RUN \ libsodium-dev \ libtool \ libunistring-dev \ + libwebsockets-dev \ make \ openjdk8-jre-base \ + openssl-dev \ protobuf-c-dev \ sqlite-dev \ taglib-dev \ @@ -45,26 +42,6 @@ RUN \ --repository http://nl.alpinelinux.org/alpine/edge/testing \ libantlr3c-dev \ mxml-dev && \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - avahi \ - confuse \ - dbus \ - ffmpeg \ - json-c \ - libcurl \ - libevent \ - libgcrypt \ - libplist \ - libsodium \ - libunistring \ - protobuf-c \ - sqlite \ - sqlite-libs && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/testing \ - libantlr3c \ - mxml && \ echo "**** make antlr wrapper and compile forked-daapd ****" && \ mkdir -p \ /tmp/source/forked-daapd && \ @@ -85,10 +62,6 @@ RUN \ /tmp/source/forked-daapd --strip-components=1 && \ export PATH="/tmp/source:$PATH" && \ cd /tmp/source/forked-daapd && \ - echo "**** fetch updated configure file if version equals 26.0 ****" && \ - if [ $DAAPD_VER==26.0 ]; then \ - curl -o /tmp/source/forked-daapd/configure.ac -L \ - "https://raw.githubusercontent.com/ejurgensen/forked-daapd/5e13bac8672bd866d43e1988ff8aa831b704d9b4/configure.ac" ; fi && \ autoreconf -i -v && \ ./configure \ --build=$CBUILD \ @@ -104,15 +77,44 @@ RUN \ --prefix=/app \ --sysconfdir=/etc && \ make && \ - make install && \ - cp /etc/forked-daapd.conf /etc/forked-daapd.conf.orig && \ - echo "**** cleanup ****" && \ - apk del --purge \ - build-dependencies && \ - rm -rf \ - /tmp/* + make install + +############## runtime stage ############## +FROM lsiobase/alpine:3.7 + +# set version label +ARG BUILD_DATE +ARG VERSION +LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="sparklyballs" + +RUN \ + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + avahi \ + confuse \ + dbus \ + ffmpeg \ + json-c \ + libcurl \ + libevent \ + libgcrypt \ + libplist \ + libsodium \ + libunistring \ + libwebsockets \ + openssl \ + protobuf-c \ + sqlite \ + sqlite-libs && \ + apk add --no-cache \ + --repository http://nl.alpinelinux.org/alpine/edge/testing \ + libantlr3c \ + mxml -# copy local files +# copy buildstage and local files +COPY --from=buildstage /etc/forked-daapd.conf /etc/forked-daapd.conf.orig +COPY --from=buildstage /app/ app/ COPY root/ / # ports and volumes diff --git a/README.md b/README.md index 2233d1a..a0c8a66 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ For further setup options of remotes etc, check out the daapd website, [Forked-d ## Versions ++ **09.06.18:** Use buildstage and update dependencies. + **05.03.18:** Use updated configure ac and disable avcodecsend to hopefully mitigate crashes with V26. + **25.02.18:** Query version before pull and build latest release. + **03.01.18:** Deprecate cpu_core routine lack of scaling.