forked from balena-io-experimental/balena-kodi
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.template
70 lines (56 loc) · 1.85 KB
/
Dockerfile.template
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
# see https://hub.docker.com/r/balenalib/raspberry-pi-node/tags
FROM balenalib/%%BALENA_MACHINE_NAME%%-node:latest-stretch-run
# 1.Install wget and curl. Only wget is needed for downloading repository.sandmann79.plugins-1.0.2.zip
RUN apt-get clean && apt-get update && apt-get install -y \
wget \
curl
# 2. wget sandmann79 plugins repository (needed to install amazon VOD plug-in)
RUN wget https://github.com/Sandmann79/xbmc/releases/download/v1.0.2/repository.sandmann79.plugins-1.0.2.zip
# Install apt deps
RUN apt-get clean && apt-get update && apt-get upgrade -y && apt-get install \
libraspberrypi-bin=1.20180328-1~nokernel1 libraspberrypi0=1.20180328-1~nokernel1 --allow-downgrades -y \
apt-utils \
build-essential \
libasound2-dev \
libffi-dev \
libssl-dev \
python-dev \
python-pip \
git \
alsa-base \
alsa-utils \
fbset \
kodi \
kodi-inputstream-adaptive \
libnss3 \
&& rm -rf /var/lib/apt/lists/*
# Configure for Kodi
COPY ./Dockerbin/99-input.rules /etc/udev/rules.d/99-input.rules
COPY ./Dockerbin/10-permissions.rules /etc/udev/rules.d/10-permissions.rules
RUN addgroup --system input && \
usermod -a -G audio root && \
usermod -a -G video root && \
usermod -a -G input root && \
usermod -a -G dialout root && \
usermod -a -G plugdev root && \
usermod -a -G tty root
# Set npm
RUN npm config set unsafe-perm true
# Uncomment if you want to Configure for pHAT DAC
# COPY ./Dockerbin/asound.conf /etc/asound.conf
# Save source folder
RUN printf "%s\n" "${PWD##}" > SOURCEFOLDER
# Move to app dir
WORKDIR /usr/src/app
# Move package.json to filesystem
COPY "$SOURCEFOLDER/app/package.json" ./
# NPM i app
RUN JOBS=MAX npm i --production
# Move app and advancedsetting.xml to filesystem
COPY "$SOURCEFOLDER/app" ./
# Move to /
WORKDIR /
## uncomment if you want systemd
ENV INITSYSTEM on
# Start app
CMD ["bash", "/usr/src/app/start.sh"]