forked from ShokoAnime/ShokoServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·43 lines (32 loc) · 1.64 KB
/
Copy pathDockerfile
File metadata and controls
executable file
·43 lines (32 loc) · 1.64 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
FROM 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
RUN dotnet build -c=Release -r linux-x64 -f net10.0 -o=/usr/src/app/build/ Shoko.CLI/Shoko.CLI.csproj /p:Version="${version}" /p:InformationalVersion="\"channel=${channel},commit=${commit},tag=${tag},date=${date},\""
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 \
&& 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.
&& 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 \
&& echo "deb [signed-by=/usr/share/keyrings/mediainfo.gpg] https://mediaarea.net/repo/deb/debian/ bookworm main" | tee -a /etc/apt/sources.list \
&& 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"]