forked from babagreensheep/jellyfin-tizen-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
74 lines (57 loc) · 2.46 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
FROM ubuntu:22.04
RUN apt-get update; apt-get -y upgrade; apt-get clean
RUN DEBIAN_FRONTEND=noninteractive TZ=Singapore apt-get -y install tzdata
RUN apt-get -qq install -y git openssh-server
RUN apt-get install -y sudo
RUN apt-get install -y curl
RUN apt-get -y install expect
# install node JS & update
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
RUN npm update
# Create user to install tizen-studio
RUN useradd -m jellyfin -s /bin/bash
# Copy tizen-studio executable
USER jellyfin
# COPY ./web-cli_Tizen_Studio_4.6_ubuntu-64.bin /home/jellyfin
RUN wget https://download.tizen.org/sdk/Installer/tizen-studio_4.6/web-cli_Tizen_Studio_4.6_ubuntu-64.bin -P /home/jellyfin
# Execute tizen-studio executable
RUN chmod a+x /home/jellyfin/web-cli_Tizen_Studio_4.6_ubuntu-64.bin
RUN ./home/jellyfin/web-cli_Tizen_Studio_4.6_ubuntu-64.bin --accept-license /home/jellyfin/tizen-studio
# Add export path
ENV PATH=${PATH}:/home/jellyfin/tizen-studio/tools/ide/bin:/home/jellyfin/tizen-studio/tools
# Create certificates
RUN tizen \
certificate \
-a Jellyfin \
-p 1234 \
-c SG \
-ct SG \
-n Jellyfin \
-f Jellyfin
# Load profile
RUN tizen \
security-profiles add \
-n Jellyfin \
-a /home/jellyfin/tizen-studio-data/keystore/author/Jellyfin.p12 \
-p 1234
# Switch passwords
RUN sed -i 's/\/home\/jellyfin\/tizen-studio-data\/keystore\/author\/Jellyfin.pwd//' /home/jellyfin/tizen-studio-data/profile/profiles.xml
RUN sed -i 's/\/home\/jellyfin\/tizen-studio-data\/tools\/certificate-generator\/certificates\/distributor\/tizen-distributor-signer.pwd/tizenpkcs12passfordsigner/' /home/jellyfin/tizen-studio-data/profile/profiles.xml
# Git clone apps
RUN git clone https://github.com/jellyfin/jellyfin-web.git /home/jellyfin/jellyfin-web
RUN git clone https://github.com/jellyfin/jellyfin-tizen.git /home/jellyfin/jellyfin-tizen
# Build Jellyfin Web
WORKDIR /home/jellyfin/jellyfin-web
RUN npm ci --no-audit
RUN npm run build:production
# Build Jellyfin Tizen
WORKDIR /home/jellyfin/jellyfin-tizen
ENV JELLYFIN_WEB_DIR=/home/jellyfin/jellyfin-web/dist
RUN npm ci --no-audit
RUN tizen build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"
COPY --chown=jellyfin ./expect.sh /home/jellyfin/jellyfin-tizen/expect.sh
RUN chmod a+x /home/jellyfin/jellyfin-tizen/expect.sh
RUN ./expect.sh
ENV TV_IP=127.0.0.1
# ENTRYPOINT ["tail", "-f", "/dev/null"]