diff --git a/Dockerfile b/Dockerfile index 0ad2bdc..292fffe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM lsiobase/alpine:3.6 -MAINTAINER sparklyballs +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="sparklybals" -# install build packages RUN \ + echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ cmake \ ffmpeg-dev \ @@ -19,16 +19,15 @@ RUN \ make \ openjpeg-dev \ python2-dev && \ - -# install runtime packages + echo "**** install runtime packages ****" && \ apk add --no-cache \ curl \ expat \ ffmpeg \ ffmpeg-libs \ gdbm \ - gst-plugins-good1 \ - gstreamer1 \ + gst-plugins-good \ + gstreamer \ jpeg \ lame \ libffi \ @@ -41,8 +40,7 @@ RUN \ sqlite-libs \ tar \ wget && \ - -# compile mp3gain + echo "**** compile mp3gain ****" && \ mkdir -p \ /tmp/mp3gain-src && \ curl -o \ @@ -51,10 +49,21 @@ RUN \ cd /tmp/mp3gain-src && \ unzip -qq /tmp/mp3gain-src/mp3gain.zip && \ sed -i "s#/usr/local/bin#/usr/bin#g" /tmp/mp3gain-src/Makefile && \ - make && \ + echo "**** attempt to set number of cores available for make to use ****" && \ + set -ex && \ + CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \ + if echo $CPU_CORES | grep -E -q '^[0-9]+$'; then \ + : ;\ + if [ "$CPU_CORES" -gt 7 ]; then \ + CPU_CORES=$(( CPU_CORES - 3 )); \ + elif [ "$CPU_CORES" -gt 5 ]; then \ + CPU_CORES=$(( CPU_CORES - 2 )); \ + elif [ "$CPU_CORES" -gt 3 ]; then \ + CPU_CORES=$(( CPU_CORES - 1 )); fi \ + else CPU_CORES="1"; fi && \ + make -j $CPU_CORES && \ make install && \ - -# compile chromaprint + echo "**** compile chromaprint ****" && \ git clone https://bitbucket.org/acoustid/chromaprint.git \ /tmp/chromaprint && \ cd /tmp/chromaprint && \ @@ -62,10 +71,10 @@ RUN \ -DBUILD_TOOLS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX:PATH=/usr && \ - make && \ + make -j $CPU_CORES && \ + set +ex && \ make install && \ - -# install pip packages + echo "**** install pip packages ****" && \ pip install --no-cache-dir -U \ beets \ beets-copyartifacts \ @@ -75,8 +84,7 @@ RUN \ pyacoustid \ pylast \ unidecode && \ - -# cleanup + echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ diff --git a/README.md b/README.md index fc4738f..a594380 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ Contains [beets-copyartifacts](https://github.com/sbarakat/beets-copyartifacts) ## Versions ++ **06.12.17:** Rebase to alpine linux 3.7. + **25.05.17:** Rebase to alpine linux 3.6. + **06.02.17:** Rebase to alpine linux 3.5. + **16.01.17:** Add packages required for replaygain.