-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (25 loc) · 862 Bytes
/
Dockerfile
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
# Set the base image to the official .NET Core runtime image for ASP.NET Core 7
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
ENV GOOGLE_CLIENT ""
ENV GOOGLE_SECRET ""
ENV JWT_ISSUER ""
ENV JWT_KEY "LOGIN-API"
ENV JWT_LIFETIME 86000
ENV MONGO_CLIENT_NAME "LOGIN-API"
ENV MONGODB_URI ""
ENV SECRET_PASSWORD ""
# Set the base image to the official .NET Core SDK image to build the application
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["Jantzch.Server2.csproj", "./"]
RUN dotnet restore "./Jantzch.Server2.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "Jantzch.Server2.csproj" -c Release -o /app/build
# Set the final image to the base image and copy the compiled application from the build image
FROM base AS final
WORKDIR /app
COPY --from=build /app/build .
ENTRYPOINT ["dotnet", "Jantzch.Server2.dll"]