-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathDockerfile
208 lines (194 loc) · 5.22 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Serviio docker
#
# Run with: docker run --rm --name serviio -d -p 23423:23423/tcp -p 23424:23424/tcp -p 8895:8895/tcp -p 1900:1900/udp -v /etc/localtime:/etc/localtime:ro riftbit/serviio
FROM alpine:3.12
MAINTAINER "[riftbit] ErgoZ <ergozru@gmail.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION=2.2.1
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://riftbit.com/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://hub.docker.com/r/riftbit/serviio/" \
org.label-schema.vendor="[riftbit] ErgoZ <ergozru@gmail.com>" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
maintainer="[riftbit] ErgoZ <ergozru@gmail.com>"
ARG FFMPEG_VERSION=4.3.2
ARG JASPER_VERSION=2.0.14
ENV JAVA_HOME="/usr"
# 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; \
# Prepare APK CDNs
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.11/community" >> /etc/apk/repositories && \
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 && \
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 \
openssl \
p11-kit \
sdl \
x264-libs \
x264 \
x265 \
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 \
cmake \
musl-dev \
nasm \
nettle \
opus-dev \
openssl-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-small \
--enable-version3 \
--enable-vaapi \
--extra-libs="-lpthread -lm" \
--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} && \
curl -sfL https://www.ece.uvic.ca/~frodo/jasper/software/jasper-${JASPER_VERSION}.tar.gz | tar xz && \
cd jasper-${JASPER_VERSION} && \
mkdir ./obj && \
cd ./obj && \
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib && \
make && \
make install && \
cd ${DIR} && \
wget https://raw.githubusercontent.com/riftbit/dcraw/master/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", "/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
HEALTHCHECK --start-period=5m CMD wget --quiet --tries=1 -O /dev/null --server-response --timeout=5 http://127.0.0.1:23423/console/ || exit 1
#-Dserviio.defaultTranscodeFolder=/opt/serviio/transcode
CMD tail -f /opt/serviio/log/serviio.log & /opt/serviio/bin/serviio.sh