This repository was archived by the owner on Aug 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.aarch64
More file actions
72 lines (62 loc) · 2.04 KB
/
Dockerfile.aarch64
File metadata and controls
72 lines (62 loc) · 2.04 KB
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
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine as builder
# set version label
ARG TESLACAMPLAYER_VERSION
RUN \
apk add --no-cache \
nodejs \
npm \
jq && \
echo "**** download TeslaCamPlayer ****" && \
mkdir -p \
/tmp/TeslaCamPlayer && \
if [ -z ${TESLACAMPLAYER_VERSION} ]; then \
TESLACAMPLAYER_VERSION=$(curl -sL https://api.github.com/repos/hydazz/TeslaCamPlayer/releases/latest | \
jq -r '.tag_name'); \
fi && \
curl -o \
/tmp/TeslaCamPlayer.tar.gz -L \
"https://github.com/hydazz/TeslaCamPlayer/archive/${TESLACAMPLAYER_VERSION}.tar.gz" && \
tar xf \
/tmp/TeslaCamPlayer.tar.gz -C \
/tmp/TeslaCamPlayer --strip-components=1 && \
cd /tmp/TeslaCamPlayer/src/TeslaCamPlayer.BlazorHosted/Server && \
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>${TESLACAMPLAYER_VERSION}<\/AssemblyVersion>/g" TeslaCamPlayer.BlazorHosted.Server.csproj && \
dotnet restore && \
dotnet publish -c Release -o /tmp/build --no-restore --self-contained true -r linux-arm64 /p:PublishTrimmed=true /p:DefineConstants=DOCKER && \
cd ../Client && \
npm install && \
npm install -g gulp && \
gulp default && \
rm -rf /tmp/build/lib && \
mkdir -p /out/app/teslacamplayer/wwwroot && \
cp -r /tmp/build/* /out/app/teslacamplayer/ && \
cp -r wwwroot/css/ /out/app/teslacamplayer/wwwroot/css/
# runtime
FROM ghcr.io/imagegenius/baseimage-ubuntu:arm64v8-noble
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="ImageGenius Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="hydazz"
# environment settings
ENV ClipsRootPath=/media \
CacheFilePath=/config/clips.json \
ASPNETCORE_URLS=http://+:5000
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
ffmpeg && \
echo "**** cleanup ****" && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
COPY --from=builder /out/ /
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 5000
VOLUME /config /media