Dockerfile

This commit is contained in:
femsci 2023-10-01 12:03:11 +02:00
parent 271b144501
commit a5cf572c05
Signed by: femsci
GPG key ID: 08F7911F0E650C67

35
Dockerfile Normal file
View file

@ -0,0 +1,35 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
WORKDIR /source
COPY Interlinked.sln ./
COPY src/Interlinked.Core/*.csproj src/Interlinked.Core/
COPY src/Interlinked.Shared/*.csproj src/Interlinked.Shared/
COPY src/Interlinked.User/*.csproj src/Interlinked.User/
copy test/Interlinked.Test/*.csproj test/Interlinked.Test/
RUN dotnet restore
COPY . .
RUN dotnet publish ./src/Interlinked.User -c Release -o /build/interlinked
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS runtime
COPY --from=build /build/interlinked /srv/interlinked
VOLUME [ "/data", "/srv/log" ]
WORKDIR /srv/interlinked
ENV ASPNETCORE_ENVIRONMENT=Production
# Net
EXPOSE 80/tcp
STOPSIGNAL SIGTERM
ENTRYPOINT [ "dotnet", "/srv/interlinked/Interlinked.User.dll" ]