From c228e4e72cbcacd0a737e8216bc112486c18be3a Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 12 Feb 2022 19:44:36 +0000 Subject: [PATCH 1/5] Rebase to Alpine 3.15 --- Dockerfile | 241 ++++++++++++++++++++++----------------------- Dockerfile.aarch64 | 228 +++++++++++++++++++++--------------------- Dockerfile.armhf | 230 +++++++++++++++++++++--------------------- readme-vars.yml | 1 + 4 files changed, 346 insertions(+), 354 deletions(-) diff --git a/Dockerfile b/Dockerfile index 756750f..fba3e12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as buildstage ############## build stage ############## ARG DAAPD_RELEASE @@ -6,105 +6,103 @@ ARG LIBSPOTIFY_VERSION=12.1.51 ARG ARCH=x86_64 RUN \ - echo "**** install build packages ****" && \ - apk add --no-cache \ - alsa-lib-dev \ - autoconf \ - automake \ - avahi-dev \ - bash \ - bsd-compat-headers \ - confuse-dev \ - curl \ - curl-dev \ - ffmpeg-dev \ - file \ - flac-dev \ - g++ \ - gcc \ - gettext-dev \ - gnutls-dev \ - gperf \ - json-c-dev \ - libcurl \ - libevent-dev \ - libgcrypt-dev \ - libogg-dev \ - libplist-dev \ - libressl-dev \ - libsodium-dev \ - libtool \ - libunistring-dev \ - libwebsockets-dev \ - make \ - openjdk8-jre-base \ - protobuf-c-dev \ - sqlite-dev \ - taglib-dev \ - tar && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ - mxml-dev && \ - echo "**** make antlr wrapper ****" && \ - mkdir -p \ - /tmp/source/owntone && \ - echo \ - "#!/bin/bash" > /tmp/source/antlr3 && \ - echo \ - "exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \ - chmod a+x /tmp/source/antlr3 && \ - curl -o \ - /tmp/source/antlr-3.4-complete.jar -L \ - http://www.antlr3.org/download/antlr-3.4-complete.jar && \ - echo "**** compile and install antlr3c ****" && \ - curl -o \ - /tmp/libantlr3c-3.4.tar.gz -L \ - https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \ - tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \ - cd /tmp/libantlr3c-3.4 && \ - ./configure --enable-64bit --prefix=/usr && \ - make && \ - make DESTDIR=/tmp/antlr3c-build install && \ - export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \ - export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \ - echo "**** compile owntone-server ****" && \ - if [ -z ${DAAPD_RELEASE+x} ]; then \ - DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - curl -L https://github.com/mopidy/libspotify-archive/blob/master/libspotify-${LIBSPOTIFY_VERSION}-Linux-${ARCH}-release.tar.gz?raw=true | tar -xzf- -C /tmp/source/ && \ - mv /tmp/source/libspotify* /tmp/source/libspotify && \ - sed -i 's/ldconfig//' /tmp/source/libspotify/Makefile && \ - make -C /tmp/source/libspotify prefix=/tmp/libspotify-build install && \ - rm -rf /tmp/source/libspotify && \ - export LIBSPOTIFY_CFLAGS="-I/tmp/libspotify-build/include" && \ - export LIBSPOTIFY_LIBS="/tmp/libspotify-build/lib/libspotify.so" && \ - curl -o \ - /tmp/source/owntone.tar.gz -L \ - "https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \ - tar xf /tmp/source/owntone.tar.gz -C \ - /tmp/source/owntone --strip-components=1 && \ - export PATH="/tmp/source:$PATH" && \ - cd /tmp/source/owntone && \ - autoreconf -i -v && \ - ./configure \ - --build=$CBUILD \ - --enable-chromecast \ - --enable-itunes \ - --enable-lastfm \ - --enable-mpd \ + echo "**** install build packages ****" && \ + apk add -U --update --no-cache \ + alsa-lib-dev \ + autoconf \ + automake \ + avahi-dev \ + bash \ + bsd-compat-headers \ + confuse-dev \ + curl \ + curl-dev \ + ffmpeg-dev \ + file \ + flac-dev \ + g++ \ + gcc \ + gettext-dev \ + gnutls-dev \ + gperf \ + json-c-dev \ + libcurl \ + libevent-dev \ + libgcrypt-dev \ + libogg-dev \ + libplist-dev \ + libressl-dev \ + libsodium-dev \ + libtool \ + libunistring-dev \ + libwebsockets-dev \ + make \ + mxml-dev \ + openjdk8-jre-base \ + protobuf-c-dev \ + sqlite-dev \ + taglib-dev \ + tar && \ + echo "**** make antlr wrapper ****" && \ + mkdir -p \ + /tmp/source/owntone && \ + echo \ + "#!/bin/bash" > /tmp/source/antlr3 && \ + echo \ + "exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \ + chmod a+x /tmp/source/antlr3 && \ + curl -o \ + /tmp/source/antlr-3.4-complete.jar -L \ + http://www.antlr3.org/download/antlr-3.4-complete.jar && \ + echo "**** compile and install antlr3c ****" && \ + curl -o \ + /tmp/libantlr3c-3.4.tar.gz -L \ + https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \ + tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \ + cd /tmp/libantlr3c-3.4 && \ + ./configure --enable-64bit --prefix=/usr && \ + make && \ + make DESTDIR=/tmp/antlr3c-build install && \ + export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \ + export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \ + echo "**** compile owntone-server ****" && \ + if [ -z ${DAAPD_RELEASE+x} ]; then \ + DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + curl -L https://github.com/mopidy/libspotify-archive/blob/master/libspotify-${LIBSPOTIFY_VERSION}-Linux-${ARCH}-release.tar.gz?raw=true | tar -xzf- -C /tmp/source/ && \ + mv /tmp/source/libspotify* /tmp/source/libspotify && \ + sed -i 's/ldconfig//' /tmp/source/libspotify/Makefile && \ + make -C /tmp/source/libspotify prefix=/tmp/libspotify-build install && \ + rm -rf /tmp/source/libspotify && \ + export LIBSPOTIFY_CFLAGS="-I/tmp/libspotify-build/include" && \ + export LIBSPOTIFY_LIBS="/tmp/libspotify-build/lib/libspotify.so" && \ + curl -o \ + /tmp/source/owntone.tar.gz -L \ + "https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \ + tar xf /tmp/source/owntone.tar.gz -C \ + /tmp/source/owntone --strip-components=1 && \ + export PATH="/tmp/source:$PATH" && \ + cd /tmp/source/owntone && \ + autoreconf -i -v && \ + ./configure \ + --build=$CBUILD \ + --enable-chromecast \ + --enable-itunes \ + --enable-lastfm \ + --enable-mpd \ --enable-spotify \ - --host=$CHOST \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --prefix=/usr \ - --sysconfdir=/etc && \ - make && \ - make DESTDIR=/tmp/daapd-build install && \ - mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig + --host=$CHOST \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --prefix=/usr \ + --sysconfdir=/etc && \ + make && \ + make DESTDIR=/tmp/daapd-build install && \ + mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig ############## runtime stage ############## -FROM ghcr.io/linuxserver/baseimage-alpine:3.12 +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 # set version label ARG BUILD_DATE @@ -113,29 +111,27 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="BernsteinA" RUN \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - avahi \ - confuse \ - dbus \ - ffmpeg \ - json-c \ - libcurl \ - libevent \ - libgcrypt \ - libplist \ - libressl \ - libsodium \ - libunistring \ - libwebsockets \ - protobuf-c \ - sqlite \ - sqlite-libs && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ - mxml && \ - apk add --no-cache \ - --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ + echo "**** install runtime packages ****" && \ + apk add -U --update --no-cache \ + avahi \ + confuse \ + curl \ + dbus \ + ffmpeg \ + json-c \ + libcurl \ + libevent \ + libgcrypt \ + libplist \ + libressl \ + libsodium \ + libunistring \ + libwebsockets \ + mxml \ + protobuf-c \ + sqlite \ + sqlite-libs && \ + apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ librespot # copy buildstage and local files @@ -146,4 +142,5 @@ COPY root/ / # ports and volumes EXPOSE 3689 -VOLUME /config /music + +VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index f8508bd..55b5e89 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,101 +1,100 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12 as buildstage +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 as buildstage ############## build stage ############## ARG DAAPD_RELEASE RUN \ - echo "**** install build packages ****" && \ - apk add --no-cache \ - alsa-lib-dev \ - autoconf \ - automake \ - avahi-dev \ - bash \ - bsd-compat-headers \ - confuse-dev \ - curl \ - curl-dev \ - ffmpeg-dev \ - file \ - flac-dev \ - g++ \ - gcc \ - gettext-dev \ - gnutls-dev \ - gperf \ - json-c-dev \ - libcurl \ - libevent-dev \ - libgcrypt-dev \ - libogg-dev \ - libplist-dev \ - libressl-dev \ - libsodium-dev \ - libtool \ - libunistring-dev \ - libwebsockets-dev \ - make \ - openjdk8-jre-base \ - protobuf-c-dev \ - sqlite-dev \ - taglib-dev \ - tar && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ - mxml-dev && \ - echo "**** make antlr wrapper ****" && \ - mkdir -p \ - /tmp/source/owntone && \ - echo \ - "#!/bin/bash" > /tmp/source/antlr3 && \ - echo \ - "exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \ - chmod a+x /tmp/source/antlr3 && \ - curl -o \ - /tmp/source/antlr-3.4-complete.jar -L \ - http://www.antlr3.org/download/antlr-3.4-complete.jar && \ +RUN \ + echo "**** install build packages ****" && \ + apk add -U --update --no-cache \ + alsa-lib-dev \ + autoconf \ + automake \ + avahi-dev \ + bash \ + bsd-compat-headers \ + confuse-dev \ + curl \ + curl-dev \ + ffmpeg-dev \ + file \ + flac-dev \ + g++ \ + gcc \ + gettext-dev \ + gnutls-dev \ + gperf \ + json-c-dev \ + libcurl \ + libevent-dev \ + libgcrypt-dev \ + libogg-dev \ + libplist-dev \ + libressl-dev \ + libsodium-dev \ + libtool \ + libunistring-dev \ + libwebsockets-dev \ + make \ + mxml-dev \ + openjdk8-jre-base \ + protobuf-c-dev \ + sqlite-dev \ + taglib-dev \ + tar && \ + echo "**** make antlr wrapper ****" && \ + mkdir -p \ + /tmp/source/owntone && \ + echo \ + "#!/bin/bash" > /tmp/source/antlr3 && \ + echo \ + "exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \ + chmod a+x /tmp/source/antlr3 && \ + curl -o \ + /tmp/source/antlr-3.4-complete.jar -L \ + http://www.antlr3.org/download/antlr-3.4-complete.jar && \ echo "**** compile and install antlr3c ****" && \ - curl -o \ - /tmp/libantlr3c-3.4.tar.gz -L \ - https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \ - tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \ - cd /tmp/libantlr3c-3.4 && \ - ./configure --build arm-unknown-linux-gnueabi --disable-abiflags --disable-antlrdebug --enable-64bit --prefix=/usr && \ - make && \ - make DESTDIR=/tmp/antlr3c-build install && \ - export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \ - export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \ - echo "**** compile owntone-server ****" && \ - if [ -z ${DAAPD_RELEASE+x} ]; then \ - DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - curl -o \ - /tmp/source/owntone.tar.gz -L \ - "https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \ - tar xf /tmp/source/owntone.tar.gz -C \ - /tmp/source/owntone --strip-components=1 && \ - export PATH="/tmp/source:$PATH" && \ - cd /tmp/source/owntone && \ - autoreconf -i -v && \ - ./configure \ - --build=$CBUILD \ - --disable-avcodecsend \ - --enable-chromecast \ - --enable-itunes \ - --enable-lastfm \ - --enable-mpd \ - --host=$CHOST \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --prefix=/usr \ - --sysconfdir=/etc && \ - make && \ - make DESTDIR=/tmp/daapd-build install && \ - mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig + curl -o \ + /tmp/libantlr3c-3.4.tar.gz -L \ + https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \ + tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \ + cd /tmp/libantlr3c-3.4 && \ + ./configure --build arm-unknown-linux-gnueabi --disable-abiflags --disable-antlrdebug --enable-64bit --prefix=/usr && \ + make && \ + make DESTDIR=/tmp/antlr3c-build install && \ + export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \ + export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \ + echo "**** compile owntone-server ****" && \ + if [ -z ${DAAPD_RELEASE+x} ]; then \ + DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + curl -o \ + /tmp/source/owntone.tar.gz -L \ + "https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \ + tar xf /tmp/source/owntone.tar.gz -C \ + /tmp/source/owntone --strip-components=1 && \ + export PATH="/tmp/source:$PATH" && \ + cd /tmp/source/owntone && \ + autoreconf -i -v && \ + ./configure \ + --build=$CBUILD \ + --disable-avcodecsend \ + --enable-chromecast \ + --enable-itunes \ + --enable-lastfm \ + --enable-mpd \ + --host=$CHOST \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --prefix=/usr \ + --sysconfdir=/etc && \ + make && \ + make DESTDIR=/tmp/daapd-build install && \ + mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig ############## runtime stage ############## -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 # set version label ARG BUILD_DATE @@ -104,29 +103,27 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="BernsteinA" RUN \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - avahi \ - confuse \ - dbus \ - ffmpeg \ - json-c \ - libcurl \ - libevent \ - libgcrypt \ - libplist \ - libressl \ - libsodium \ - libunistring \ - libwebsockets \ - protobuf-c \ - sqlite \ - sqlite-libs && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ - mxml && \ - apk add --no-cache \ - --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ + echo "**** install runtime packages ****" && \ + apk add -U --update --no-cache \ + avahi \ + confuse \ + curl \ + dbus \ + ffmpeg \ + json-c \ + libcurl \ + libevent \ + libgcrypt \ + libplist \ + libressl \ + libsodium \ + libunistring \ + libwebsockets \ + mxml \ + protobuf-c \ + sqlite \ + sqlite-libs && \ + apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ librespot # copy buildstage and local files @@ -136,4 +133,5 @@ COPY root/ / # ports and volumes EXPOSE 3689 -VOLUME /config /music + +VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index f69d5a1..345d79b 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,102 +1,99 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.12 as buildstage +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 as buildstage ############## build stage ############## ARG DAAPD_RELEASE -ARG ARCH=armv7 RUN \ - echo "**** install build packages ****" && \ - apk add --no-cache \ - alsa-lib-dev \ - autoconf \ - automake \ - avahi-dev \ - bash \ - bsd-compat-headers \ - confuse-dev \ - curl \ - curl-dev \ - ffmpeg-dev \ - file \ - flac-dev \ - g++ \ - gcc \ - gettext-dev \ - gnutls-dev \ - gperf \ - json-c-dev \ - libcurl \ - libevent-dev \ - libgcrypt-dev \ - libogg-dev \ - libplist-dev \ - libressl-dev \ - libsodium-dev \ - libtool \ - libunistring-dev \ - libwebsockets-dev \ - make \ - openjdk8-jre-base \ - protobuf-c-dev \ - sqlite-dev \ - taglib-dev \ - tar && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ - mxml-dev && \ - echo "**** make antlr wrapper ****" && \ - mkdir -p \ - /tmp/source/owntone && \ - echo \ - "#!/bin/bash" > /tmp/source/antlr3 && \ - echo \ - "exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \ - chmod a+x /tmp/source/antlr3 && \ - curl -o \ - /tmp/source/antlr-3.4-complete.jar -L \ - http://www.antlr3.org/download/antlr-3.4-complete.jar && \ - echo "**** compile and install antlr3c ****" && \ - curl -o \ - /tmp/libantlr3c-3.4.tar.gz -L \ - https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \ - tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \ - cd /tmp/libantlr3c-3.4 && \ - ./configure --build arm-unknown-linux-gnueabihf --disable-abiflags --disable-antlrdebug --prefix=/usr && \ - make && \ - make DESTDIR=/tmp/antlr3c-build install && \ - export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \ - export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \ - echo "**** compile owntone-server ****" && \ - if [ -z ${DAAPD_RELEASE+x} ]; then \ - DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - curl -o \ - /tmp/source/owntone.tar.gz -L \ - "https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \ - tar xf /tmp/source/owntone.tar.gz -C \ - /tmp/source/owntone --strip-components=1 && \ - export PATH="/tmp/source:$PATH" && \ - cd /tmp/source/owntone && \ - autoreconf -i -v && \ - ./configure \ - --build=$CBUILD \ - --disable-avcodecsend \ - --enable-chromecast \ - --enable-itunes \ - --enable-lastfm \ - --enable-mpd \ - --host=$CHOST \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --prefix=/usr \ - --sysconfdir=/etc && \ - make && \ - make DESTDIR=/tmp/daapd-build install && \ - mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig + echo "**** install build packages ****" && \ + apk add -U --update --no-cache \ + alsa-lib-dev \ + autoconf \ + automake \ + avahi-dev \ + bash \ + bsd-compat-headers \ + confuse-dev \ + curl \ + curl-dev \ + ffmpeg-dev \ + file \ + flac-dev \ + g++ \ + gcc \ + gettext-dev \ + gnutls-dev \ + gperf \ + json-c-dev \ + libcurl \ + libevent-dev \ + libgcrypt-dev \ + libogg-dev \ + libplist-dev \ + libressl-dev \ + libsodium-dev \ + libtool \ + libunistring-dev \ + libwebsockets-dev \ + make \ + mxml-dev \ + openjdk8-jre-base \ + protobuf-c-dev \ + sqlite-dev \ + taglib-dev \ + tar && \ + echo "**** make antlr wrapper ****" && \ + mkdir -p \ + /tmp/source/owntone && \ + echo \ + "#!/bin/bash" > /tmp/source/antlr3 && \ + echo \ + "exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \ + chmod a+x /tmp/source/antlr3 && \ + curl -o \ + /tmp/source/antlr-3.4-complete.jar -L \ + http://www.antlr3.org/download/antlr-3.4-complete.jar && \ + echo "**** compile and install antlr3c ****" && \ + curl -o \ + /tmp/libantlr3c-3.4.tar.gz -L \ + https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \ + tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \ + cd /tmp/libantlr3c-3.4 && \ + ./configure --build arm-unknown-linux-gnueabihf --disable-abiflags --disable-antlrdebug --prefix=/usr && \ + make && \ + make DESTDIR=/tmp/antlr3c-build install && \ + export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \ + export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \ + echo "**** compile owntone-server ****" && \ + if [ -z ${DAAPD_RELEASE+x} ]; then \ + DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + curl -o \ + /tmp/source/owntone.tar.gz -L \ + "https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \ + tar xf /tmp/source/owntone.tar.gz -C \ + /tmp/source/owntone --strip-components=1 && \ + export PATH="/tmp/source:$PATH" && \ + cd /tmp/source/owntone && \ + autoreconf -i -v && \ + ./configure \ + --build=$CBUILD \ + --disable-avcodecsend \ + --enable-chromecast \ + --enable-itunes \ + --enable-lastfm \ + --enable-mpd \ + --host=$CHOST \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --prefix=/usr \ + --sysconfdir=/etc && \ + make && \ + make DESTDIR=/tmp/daapd-build install && \ + mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig ############## runtime stage ############## -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.12 +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 # set version label ARG BUILD_DATE @@ -105,29 +102,27 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="BernsteinA" RUN \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - avahi \ - confuse \ - dbus \ - ffmpeg \ - json-c \ - libcurl \ - libevent \ - libgcrypt \ - libplist \ - libressl \ - libsodium \ - libunistring \ - libwebsockets \ - protobuf-c \ - sqlite \ - sqlite-libs && \ - apk add --no-cache \ - --repository http://nl.alpinelinux.org/alpine/edge/community \ - mxml && \ - apk add --no-cache \ - --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ + echo "**** install runtime packages ****" && \ + apk add -U --update --no-cache \ + avahi \ + confuse \ + curl \ + dbus \ + ffmpeg \ + json-c \ + libcurl \ + libevent \ + libgcrypt \ + libplist \ + libressl \ + libsodium \ + libunistring \ + libwebsockets \ + mxml \ + protobuf-c \ + sqlite \ + sqlite-libs && \ + apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ librespot # copy buildstage and local files @@ -137,4 +132,5 @@ COPY root/ / # ports and volumes EXPOSE 3689 -VOLUME /config /music + +VOLUME /config diff --git a/readme-vars.yml b/readme-vars.yml index 6993172..a8f1c0b 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -65,6 +65,7 @@ app_setup_block: | # changelog changelogs: + - { date: "12.02.22:", desc: "Rebase to Alpine 3.15." } - { date: "14.09.21:", desc: "Enabled librespot. Disabled spotify on ARMv7" } - { date: "10.07.21:", desc: "Change of paths to work with the new package name, OwnTone." } - { date: "02.04.21:", desc: "Update upstream repo, again." } From 2d2cd148127668b4a1f5a9cc1aedff2c2db7c844 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 12 Feb 2022 19:45:53 +0000 Subject: [PATCH 2/5] Formatting --- root/etc/cont-init.d/30-dbus | 4 ++-- root/etc/cont-init.d/40-config | 36 +++++++++++++++++----------------- root/etc/services.d/avahi/run | 2 +- root/etc/services.d/dbus/run | 2 +- root/etc/services.d/forked/run | 4 ++-- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/root/etc/cont-init.d/30-dbus b/root/etc/cont-init.d/30-dbus index 7717944..acb99d2 100644 --- a/root/etc/cont-init.d/30-dbus +++ b/root/etc/cont-init.d/30-dbus @@ -2,11 +2,11 @@ # make our folders mkdir -p \ - /var/run/dbus + /var/run/dbus [[ -e /var/run/dbus.pid ]] && \ - rm -f /var/run/dbus.pid + rm -f /var/run/dbus.pid dbus-uuidgen --ensure sleep 1 diff --git a/root/etc/cont-init.d/40-config b/root/etc/cont-init.d/40-config index d566fd8..35e2c69 100644 --- a/root/etc/cont-init.d/40-config +++ b/root/etc/cont-init.d/40-config @@ -2,36 +2,36 @@ # make folders mkdir -p \ - /config/dbase_and_logs \ - /daapd-pidfolder + /config/dbase_and_logs \ + /daapd-pidfolder # configure defaults copy of conf if [ ! -e "/defaults/owntone.conf" ]; then cp /etc/owntone.conf.orig /defaults/owntone.conf sed -i \ - -e '/cache_path\ =/ s/# *//' \ - -e '/db_path\ =/ s/# *//' \ - -e s#ipv6\ =\ yes#ipv6\ =\ no#g \ - -e s#My\ Music\ on\ %h#LS.IO\ Music#g \ - -e s#/srv/music#/music#g \ - -e 's/\(uid.*=\).*/\1 \"abc\"/g' \ - -e s#/var/cache/owntone/cache.db#/config/dbase_and_logs/cache.db#g \ - -e s#/var/cache/owntone/songs3.db#/config/dbase_and_logs/songs3.db#g \ - -e s#/var/log/owntone.log#/config/dbase_and_logs/owntone.log#g \ - /defaults/owntone.conf + -e '/cache_path\ =/ s/# *//' \ + -e '/db_path\ =/ s/# *//' \ + -e s#ipv6\ =\ yes#ipv6\ =\ no#g \ + -e s#My\ Music\ on\ %h#LS.IO\ Music#g \ + -e s#/srv/music#/music#g \ + -e 's/\(uid.*=\).*/\1 \"abc\"/g' \ + -e s#/var/cache/owntone/cache.db#/config/dbase_and_logs/cache.db#g \ + -e s#/var/cache/owntone/songs3.db#/config/dbase_and_logs/songs3.db#g \ + -e s#/var/log/owntone.log#/config/dbase_and_logs/owntone.log#g \ + /defaults/owntone.conf fi # symlink conf to /conf [[ ! -f /config/owntone.conf ]] && \ - cp /defaults/owntone.conf /config/owntone.conf + cp /defaults/owntone.conf /config/owntone.conf [[ ! -L /etc/owntone.conf && -f /etc/owntone.conf ]] && \ - rm /etc/owntone.conf + rm /etc/owntone.conf [[ ! -L /etc/owntone.conf ]] && \ - ln -s /config/owntone.conf /etc/owntone.conf + ln -s /config/owntone.conf /etc/owntone.conf # permissions chown -R abc:abc \ - /app \ - /config \ - /daapd-pidfolder + /app \ + /config \ + /daapd-pidfolder diff --git a/root/etc/services.d/avahi/run b/root/etc/services.d/avahi/run index ea59603..926d36d 100644 --- a/root/etc/services.d/avahi/run +++ b/root/etc/services.d/avahi/run @@ -5,4 +5,4 @@ sleep 1s done exec \ - avahi-daemon --no-chroot + avahi-daemon --no-chroot diff --git a/root/etc/services.d/dbus/run b/root/etc/services.d/dbus/run index 5027a82..9ddc7e1 100644 --- a/root/etc/services.d/dbus/run +++ b/root/etc/services.d/dbus/run @@ -1,6 +1,6 @@ #!/usr/bin/with-contenv bash exec \ - dbus-daemon --system --nofork + dbus-daemon --system --nofork diff --git a/root/etc/services.d/forked/run b/root/etc/services.d/forked/run index 1cf3852..e2b1dfb 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 /usr/sbin/owntone -f \ - -P /daapd-pidfolder/owntone.pid + s6-setuidgid abc /usr/sbin/owntone -f \ + -P /daapd-pidfolder/owntone.pid From daad72d7cdc1c56ab81b6ac176bcb9d0b7c40d3c Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 12 Feb 2022 19:47:05 +0000 Subject: [PATCH 3/5] Remove spurious RUN --- Dockerfile.aarch64 | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 55b5e89..8fe2fa9 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -3,7 +3,6 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 as buildstage ARG DAAPD_RELEASE -RUN \ RUN \ echo "**** install build packages ****" && \ apk add -U --update --no-cache \ From 90c55755da1c77752fa11f86201a012e2bb32510 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 28 Feb 2022 14:35:35 +0000 Subject: [PATCH 4/5] Create /music path in case user doesn't mount it. --- Dockerfile | 3 ++- Dockerfile.aarch64 | 3 ++- Dockerfile.armhf | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fba3e12..0d3c8fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,7 +132,8 @@ RUN \ sqlite \ sqlite-libs && \ apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ - librespot + librespot && \ + mkdir -p /music # copy buildstage and local files COPY --from=buildstage /tmp/daapd-build/ / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 8fe2fa9..5746125 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -123,7 +123,8 @@ RUN \ sqlite \ sqlite-libs && \ apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ - librespot + librespot && \ + mkdir -p /music # copy buildstage and local files COPY --from=buildstage /tmp/daapd-build/ / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 345d79b..e365037 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -123,7 +123,8 @@ RUN \ sqlite \ sqlite-libs && \ apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \ - librespot + librespot && \ + mkdir -p /music # copy buildstage and local files COPY --from=buildstage /tmp/daapd-build/ / From 458828ae45736c6b3ce7e685f4ff928a62fb6ee1 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 28 Feb 2022 15:05:21 +0000 Subject: [PATCH 5/5] Add /music volume as well. --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d3c8fb..375b76d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -144,4 +144,4 @@ COPY root/ / # ports and volumes EXPOSE 3689 -VOLUME /config +VOLUME /config /music diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 5746125..e5c388e 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -134,4 +134,4 @@ COPY root/ / # ports and volumes EXPOSE 3689 -VOLUME /config +VOLUME /config /music diff --git a/Dockerfile.armhf b/Dockerfile.armhf index e365037..a7dafef 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -134,4 +134,4 @@ COPY root/ / # ports and volumes EXPOSE 3689 -VOLUME /config +VOLUME /config /music