forked from javinizer/Javinizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-arm64v8
69 lines (55 loc) · 2.47 KB
/
Dockerfile-arm64v8
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
FROM arm64v8/python:3.9-buster
# Add docker entrypoint script
ADD docker-entrypoint-arm64v8.sh /
RUN chmod +x /docker-entrypoint-arm64v8.sh
# Install dependencies
RUN apt-get update \
&& apt-get install -y unzip wget
# Create directories
RUN mkdir -p /home/data/Repository/.universal \
&& mkdir -p /home/Universal
# Add dashboard files
ADD src/Javinizer/Universal/Repository/javinizergui.ps1 /home/data/Repository
ADD src/Javinizer/Universal/Repository/dashboards.ps1 /home/data/Repository/.universal
# Download powershell universal
WORKDIR /home
RUN wget https://imsreleases.blob.core.windows.net/universal/production/1.5.13/Universal.linux-x64.1.5.13.zip
# Extract powershell universal to /home/Universal
RUN unzip -q /home/Universal.linux-x64.1.5.13.zip -d /home/Universal/ \
&& chmod +x /home/Universal/Universal.Server \
&& rm /home/Universal.linux-x64.1.5.13.zip
# Install mediainfo
RUN apt-get install -y mediainfo
# Install pwsh
RUN wget https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/powershell-7.1.3-linux-arm64.tar.gz \
&& mkdir -p /opt/microsoft/powershell/7 \
&& tar zxf ./powershell-7.1.3-linux-arm64.tar.gz -C /opt/microsoft/powershell/7 \
&& chmod +x /opt/microsoft/powershell/7/pwsh \
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
# Install pwsh modules
RUN pwsh -c "Set-PSRepository 'PSGallery' -InstallationPolicy Trusted" \
&& pwsh -c "Install-Module UniversalDashboard.Style" \
&& pwsh -c "Install-Module UniversalDashboard.Charts" \
&& pwsh -c "Install-Module UniversalDashboard.UDPlayer" \
&& pwsh -c "Install-Module UniversalDashboard.UDSpinner" \
&& pwsh -c "Install-Module UniversalDashboard.UDScrollUp" \
&& pwsh -c "Install-Module UniversalDashboard.CodeEditor" \
&& pwsh -c "Install-Module Javinizer"
# Install python modules
RUN pip3 install pillow \
google_trans_new \
googletrans==4.0.0rc1
# Clean up
#RUN apt-get purge unzip \
# wget \
# && apt-get autoremove
# Create symlink to module settings file
RUN pwsh -c "ln -s (Join-Path (Get-InstalledModule Javinizer).InstalledLocation -ChildPath jvSettings.json) /home/jvSettings.json"
# Add powershell universal environmental variables
ENV Kestrel__Endpoints__HTTP__Url http://*:8600
ENV Data__RepositoryPath ./data/Repository
ENV Data__ConnectionString ./data/database.db
ENV UniversalDashboard__AssetsFolder ./data/UniversalDashboard
ENV Logging__Path ./data/logs/log.txt
EXPOSE 8600
ENTRYPOINT ["/docker-entrypoint-arm64v8.sh"]