Dockerfile
This commit is contained in:
parent
271b144501
commit
a5cf572c05
1 changed files with 35 additions and 0 deletions
35
Dockerfile
Normal file
35
Dockerfile
Normal 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" ]
|
Loading…
Reference in a new issue