-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathDockerfile.aarch64
More file actions
44 lines (31 loc) · 1.74 KB
/
Dockerfile.aarch64
File metadata and controls
44 lines (31 loc) · 1.74 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
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG version
ARG channel
ARG commit
ARG tag
ARG date
#MAINTAINER Cayde Dixon <me@cazzar.net>
RUN mkdir -p /usr/src/app/source /usr/src/app/build
COPY . /usr/src/app/source
WORKDIR /usr/src/app/source
# maxcpucount added because we were facing this issue -> https://github.com/dotnet/sdk/issues/2902
RUN dotnet build -c=Release -f net10.0 -o=/usr/src/app/build/ -r=linux-arm64 Shoko.CLI/Shoko.CLI.csproj /p:Version="${version}" /p:InformationalVersion="\"channel=${channel},commit=${commit},tag=${tag},date=${date},\"" /maxcpucount:1
FROM mcr.microsoft.com/dotnet/aspnet:10.0
ENV PUID=1000 \
PGID=100 \
LANG=C.UTF-8 \
LC_CTYPE=C.UTF-8 \
LC_ALL=C.UTF-8
RUN apt-get update && apt-get install -y gnupg curl
RUN curl --retry 3 -O https://mediaarea.net/repo/deb/debian/pubkey.gpg
# This converts the old format gpg key to the new format. The old format cannot be used with [signed-by] in the apt sources.list file.
RUN gpg --no-default-keyring --keyring ./temp-keyring.gpg --import pubkey.gpg && gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output /usr/share/keyrings/mediainfo.gpg && rm pubkey.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/mediainfo.gpg] https://mediaarea.net/repo/deb/debian/ bookworm main" | tee -a /etc/apt/sources.list
RUN apt-get update && apt-get install -y apt-utils gosu mediainfo librhash-dev
WORKDIR /usr/src/app/build
COPY --from=build /usr/src/app/build .
COPY ./dockerentry.sh /dockerentry.sh
VOLUME /home/shoko/.shoko/
HEALTHCHECK --start-period=5m CMD curl -s -H "Content-Type: application/json" -H 'Accept: application/json' 'http://localhost:8111/api/v3/Init/Status' || exit 1
EXPOSE 8111
ENTRYPOINT ["/bin/bash", "/dockerentry.sh"]