2023-06-20 23:15:56 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-env
|
|
|
|
WORKDIR /src
|
2023-09-02 22:39:54 +02:00
|
|
|
COPY CLI /src/CLI
|
2023-07-31 00:31:19 +02:00
|
|
|
COPY Tranga /src/Tranga
|
|
|
|
COPY Logging /src/Logging
|
|
|
|
COPY Tranga.sln /src
|
|
|
|
RUN dotnet restore /src/Tranga/Tranga.csproj
|
2023-06-20 23:15:56 +02:00
|
|
|
RUN dotnet publish -c Release -o /publish
|
|
|
|
|
2023-06-20 23:26:49 +02:00
|
|
|
FROM glax/tranga-base:latest as runtime
|
2023-09-19 19:00:00 +02:00
|
|
|
EXPOSE 6531
|
|
|
|
ARG UNAME=tranga
|
|
|
|
ARG UID=1000
|
|
|
|
ARG GID=1000
|
|
|
|
RUN groupadd -g $GID -o $UNAME
|
|
|
|
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
|
|
|
|
RUN mkdir /usr/share/tranga-api
|
|
|
|
RUN mkdir /Manga
|
|
|
|
RUN chown 1000:1000 /usr/share/tranga-api
|
|
|
|
RUN chown 1000:1000 /Manga
|
|
|
|
USER $UNAME
|
|
|
|
|
2023-06-20 23:15:56 +02:00
|
|
|
WORKDIR /publish
|
|
|
|
COPY --from=build-env /publish .
|
2023-09-19 19:00:00 +02:00
|
|
|
USER 0
|
|
|
|
RUN chown 1000:1000 /publish
|
2024-02-28 04:03:53 +01:00
|
|
|
ENTRYPOINT ["dotnet", "/publish/Tranga.dll", "-f", "-c", "-l", "/usr/share/tranga-api/logs"]
|