mare.server/Docker/build/Dockerfile-MareSynchronosServices-git
2025-08-23 22:16:00 -05:00

34 lines
1,003 B
Text

FROM mcr.microsoft.com/dotnet/sdk:9.0 as BUILD
RUN git clone --recurse-submodules https://github.com/caraxi/mare.server
COPY MareAPI /server/MareAPI
COPY MareSynchronosServer/MareSynchronosShared /server/MareSynchronosServer/MareSynchronosShared
COPY MareSynchronosServer/MareSynchronosServices /server/MareSynchronosServer/MareSynchronosServices
WORKDIR /server/MareSynchronosServer/MareSynchronosServices/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/MareSynchronosServices \
MareSynchronosServices.csproj
FROM mcr.microsoft.com/dotnet/aspnet:9.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /MareSynchronosServices /opt/MareSynchronosServices
RUN chown -R mare:mare /opt/MareSynchronosServices
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosServices
CMD ["./MareSynchronosServices"]