forked from linuxserver/docker-daapd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.aarch64
136 lines (130 loc) · 3.37 KB
/
Dockerfile.aarch64
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
FROM lsiobase/alpine:arm64v8-3.11 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/testing \
mxml-dev && \
echo "**** make antlr wrapper ****" && \
mkdir -p \
/tmp/source/forked-daapd && \
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 forked-daapd ****" && \
if [ -z ${DAAPD_RELEASE+x} ]; then \
DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/ejurgensen/forked-daapd/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/source/forked.tar.gz -L \
"https://github.com/ejurgensen/forked-daapd/archive/${DAAPD_RELEASE}.tar.gz" && \
tar xf /tmp/source/forked.tar.gz -C \
/tmp/source/forked-daapd --strip-components=1 && \
export PATH="/tmp/source:$PATH" && \
cd /tmp/source/forked-daapd && \
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/forked-daapd.conf /tmp/daapd-build/etc/forked-daapd.conf.orig
############## runtime stage ##############
FROM lsiobase/alpine:arm64v8-3.11
# 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 \
libressl \
libsodium \
libunistring \
libwebsockets \
protobuf-c \
sqlite \
sqlite-libs && \
apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/testing \
mxml
# copy buildstage and local files
COPY --from=buildstage /tmp/daapd-build/ /
COPY --from=buildstage /tmp/antlr3c-build/ /
COPY root/ /
# ports and volumes
EXPOSE 3689
VOLUME /config /music