forked from rantanlan/docker-mediaelch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_Ubuntu_18.04
60 lines (58 loc) · 2.69 KB
/
Dockerfile_Ubuntu_18.04
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
FROM jlesage/baseimage-gui:ubuntu-18.04-v4
# Do most installs at once to minimise docker image layers!
# Install software-properties-common to allow 'add-apt-repository'
# Install mediaelch repository, then mediaelch
# Install ffmpeg for mediaelch to create screenshots
# Do progressive cleanups to shrink layers
# Create user for mediaelch
# Generate docker-entrypoint.sh & startapp.sh
RUN apt-get update -y && \
apt-get -y --no-install-recommends install software-properties-common && \
add-apt-repository ppa:mediaelch/mediaelch-stable && \
apt-get update -y && \
apt-get -y --no-install-recommends install \
mediaelch \
ffmpeg \
locales && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* && \
adduser --disabled-password --gecos "" mediaelch && \
touch /usr/local/bin/docker-entrypoint.sh && \
echo '#!/bin/sh' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'set -e' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'PUID=${PUID:-20000}' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'PGID=${PGID:-20000}' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'groupmod -o -g "$PGID" mediaelch' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'usermod -o -u "$PUID" mediaelch' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'chown mediaelch:mediaelch /home/mediaelch' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'chown mediaelch:mediaelch /home/mediaelch/.*' >> /usr/local/bin/docker-entrypoint.sh && \
echo 'exec "$@"' >> /usr/local/bin/docker-entrypoint.sh && \
chmod +x /usr/local/bin/docker-entrypoint.sh && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
echo 'export LC_ALL=en_US.UTF-8' >> /home/mediaelch/.profile && \
echo 'export LANG=en_US.UTF-8' >> /home/mediaelch/.profile && \
echo 'export LANGUAGE=en_US.UTF-8' >> /home/mediaelch/.profile && \
echo 'export LC_ALL=en_US.UTF-8' >> /home/mediaelch/.bashrc && \
echo 'export LANG=en_US.UTF-8' >> /home/mediaelch/.bashrc && \
echo 'export LANGUAGE=en_US.UTF-8' >> /home/mediaelch/.bashrc && \
touch /startapp.sh && \
echo '#!/bin/sh' >> /startapp.sh && \
echo 'exec env HOME=/home/mediaelch /usr/bin/MediaElch' >> /startapp.sh && \
chmod +x /startapp.sh && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
# Define variables.
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
APP_NAME="MediaElch" \
DISPLAY_WIDTH="1600" \
DISPLAY_HEIGHT="900"
VOLUME ["/media/movies"]
VOLUME ["/media/tv"]
VOLUME ["/home/mediaelch/.config/kvibes"]
# VOLUME ["/config/xdg/config/kvibes"]
# VOLUME ["/.config/kvibes/MediaElch.conf"]