-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Dockerfile
113 lines (105 loc) · 2.74 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.20 AS buildstage
############## build stage ##############
ARG DAAPD_RELEASE
RUN \
echo "**** install build packages ****" && \
apk add -U --update --no-cache \
alsa-lib-dev \
autoconf \
automake \
avahi-dev \
bison \
bsd-compat-headers \
build-base \
confuse-dev \
curl-dev \
ffmpeg-dev \
flac-dev \
flex \
gettext-dev \
gnutls-dev \
gperf \
json-c-dev \
libevent-dev \
libgcrypt-dev \
libogg-dev \
libplist-dev \
libsodium-dev \
libtool \
libunistring-dev \
libwebsockets-dev \
libxml2-dev \
mxml-dev \
openjdk8-jre-base \
openssl-dev \
protobuf-c-dev \
sqlite-dev \
taglib-dev && \
mkdir -p \
/tmp/source/owntone && \
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 \
--enable-chromecast \
--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 && \
rm -rf /tmp/daapd-build/var
############## runtime stage ##############
FROM ghcr.io/linuxserver/baseimage-alpine:3.20
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="BernsteinA"
RUN \
echo "**** install runtime packages ****" && \
apk add -U --update --no-cache \
avahi \
confuse \
dbus \
ffmpeg \
gnutls \
json-c \
libevent \
libgcrypt \
libplist \
libsodium \
libunistring \
libuuid \
libwebsockets \
mxml \
protobuf-c \
sqlite \
sqlite-libs && \
apk add -U --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \
librespot && \
mkdir -p /music && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version
# copy buildstage and local files
COPY --from=buildstage /tmp/daapd-build/ /
COPY root/ /
# ports and volumes
EXPOSE 3689
VOLUME /config /music