-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.14-debian
47 lines (40 loc) · 1.99 KB
/
Dockerfile.14-debian
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
# rebased/repackaged base image that only updates existing packages
FROM mbentley/debian:bullseye
LABEL maintainer="Matt Bentley <[email protected]>"
ARG DEBIAN_FRONTEND=noninteractive
# install packages per https://github.com/UniversalMediaServer/UniversalMediaServer/wiki/Linux-install-instructions
RUN dpkg --add-architecture i386 &&\
apt-get update &&\
apt-get install -y dcraw flac iputils-ping libfreetype6:i386 libstdc++6:i386 libbz2-1.0:i386 lib32z1 lib32ncurses6 locales mediainfo mencoder mplayer procps vlc wget &&\
echo 'LANG="en_US.UTF-8"' >> /etc/default/locale &&\
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen &&\
locale-gen &&\
rm -rf /var/lib/apt/lists/*
ENV UMS_PROFILE=/opt/ums/UMS.conf \
JAVA_OPTS="-XX:+UseContainerSupport"
# add build arg for cache busting
ARG UMSVER
# get latest release number and use that to install UMS; fail to install if version is not 14.x
RUN apt-get update &&\
apt-get install -y jq &&\
UMSVER=$(if [ -z "${UMSVER}" ]; then wget -q -O - https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/releases/latest | jq -r .name; else echo "${UMSVER}"; fi) &&\
if [ "$(echo $UMSVER | awk -F '.' '{print $1}')" -ne "14" ]; then echo "Latest version number is no longer 14"; exit 1; fi &&\
wget -nv "https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/${UMSVER}/UMS-${UMSVER}-x86_64.tgz" -O /opt/UMS-${UMSVER}.tgz &&\
cd /opt &&\
tar zxf UMS-${UMSVER}.tgz &&\
rm UMS-${UMSVER}.tgz &&\
mv ums-${UMSVER} ums &&\
mkdir /opt/ums/database /opt/ums/data /var/log/UMS &&\
groupadd -g 500 ums &&\
useradd -u 500 -g 500 -d /opt/ums ums &&\
chown -R ums:ums /opt/ums /var/log/UMS &&\
apt-get purge -y jq &&\
apt-get autoremove -y &&\
rm -rf /var/lib/apt/lists/*
# add the entrypoint
COPY entrypoint.sh /entrypoint.sh
WORKDIR /opt/ums
EXPOSE 1900/udp 2869 5001 9001
VOLUME ["/tmp","/opt/ums/database","/opt/ums/data","/var/log/UMS"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/opt/ums/UMS.sh"]