-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
185 lines (177 loc) · 5.99 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
FROM alpine:3.10
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
ARG FFMPEG_VERSION
ARG SERVIIO_VERSION
RUN echo "Buikd date: $BUILD_DATE" \
echo "VCF_REF: $VCF_REF" \
echo "Version: $VERSION" \
echo "Version: $FFMPEG_VERSION" \
echo "Version: $SERVIIO_VERSION"
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="DLNA Serviio Container" \
org.label-schema.description="DLNA Serviio Container" \
org.label-schema.url="https://sndsolutions.be/schemas/serviio" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/sndsolutions/serviio" \
org.label-schema.vendor="SnD Solutions" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
maintainer="SnD Solutions Fitch <fitch@outlook.be>"
ENV JAVA_HOME="/usr"
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.10/main" >> /etc/apk/repositories; \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.10/community" >> /etc/apk/repositories; \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories; \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories; \
apk update && apk upgrade && \
apk add --no-cache --update \
alsa-lib \
bzip2 \
expat \
fdk-aac \
lame \
libbz2 \
libdrm \
libffi \
libjpeg-turbo \
libtheora \
libogg \
libpciaccess \
librtmp \
libstdc++ \
libtasn1 \
libva \
libvorbis \
libvpx \
mesa-gl \
mesa-glapi \
musl \
opus \
openjdk8-jre \
p11-kit \
sdl \
x264-libs \
x264 \
x265 \
jasper-dev \
libass-dev \
gnutls-dev \
libwebp-dev \
lame-dev \
v4l-utils-libs \
xvidcore && \
apk add --no-cache --update --virtual=build-dependencies \
alsa-lib-dev \
bzip2-dev \
coreutils \
curl \
fdk-aac-dev \
freetype-dev \
g++ \
gcc \
git \
imlib2-dev \
lcms2-dev \
libgcc \
libjpeg-turbo-dev \
libtheora-dev \
libogg-dev \
libva-dev \
libvorbis-dev \
libvpx-dev \
libx11 \
libxau \
libxcb \
libxcb-dev \
libxdamage \
libxdmcp \
libxext \
libxfixes \
libxfixes-dev \
libxshmfence \
libxxf86vm \
make \
musl-dev \
nasm \
nettle \
opus-dev \
pkgconf \
pkgconf-dev \
rtmpdump-dev \
sdl-dev \
tar \
ttf-dejavu \
v4l-utils-dev \
x264-dev \
x265-dev \
xvidcore-dev \
yasm-dev \
zlib-dev && \
DIR=$(mktemp -d) && cd ${DIR} && \
curl -s http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz | tar zxf - -C . && \
cd ffmpeg-${FFMPEG_VERSION} && ./configure \
--disable-doc \
--disable-debug \
--disable-shared \
--enable-avfilter \
--enable-avresample \
--enable-gnutls \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-librtmp \
--enable-libtheora \
--enable-libv4l2 \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
--enable-libx264 \
--enable-libx265 \
--enable-libxcb \
--enable-libxvid \
--enable-nonfree \
--enable-pic \
--enable-pthreads \
--enable-postproc \
--enable-static \
--enable-version3 \
--enable-vaapi \
--prefix=/usr && \
make -j4 && \
make install && \
gcc -o tools/qt-faststart $CFLAGS tools/qt-faststart.c && \
install -D -m755 tools/qt-faststart /usr/bin/qt-faststart && \
make distclean && \
cd ${DIR} && \
wget https://www.dechifro.org/dcraw/dcraw.c && \
gcc -o dcraw -O4 dcraw.c -lm -ljasper -ljpeg -llcms2 && \
cp dcraw /usr/bin/dcraw && \
chmod +x /usr/bin/dcraw && \
cd ${DIR} && \
curl -s http://download.serviio.org/releases/serviio-${VERSION}-linux.tar.gz | tar zxvf - -C . && \
mkdir -p /opt/serviio && \
mkdir -p /media/serviio && \
mv ./serviio-${VERSION}/* /opt/serviio && \
chmod +x /opt/serviio/bin/serviio.sh && \
mkdir -p /opt/serviio/log && \
touch /opt/serviio/log/serviio.log && \
rm -rf ${DIR} && \
apk del --purge build-dependencies && \
rm -rf /var/cache/apk/*
VOLUME [ "/opt/serviio/config", "/opt/serviio/library", "/opt/serviio/log", "/opt/serviio/plugins", "/tmp", "/media/serviio"]
EXPOSE 1900/udp
EXPOSE 8895/tcp
# HTTP/1.1 /console /rest
EXPOSE 23423/tcp
# HTTPS/1.1 /console /rest
EXPOSE 23523/tcp
# HTTP/1.1 /cds /mediabrowser
EXPOSE 23424/tcp
# HTTPS/1.1 /cds /mediabrowser
EXPOSE 23524/tcp
CMD tail -f /opt/serviio/log/serviio.log & /opt/serviio/bin/serviio.sh