-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (14 loc) · 554 Bytes
/
Copy pathDockerfile
File metadata and controls
19 lines (14 loc) · 554 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Build Stage
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /app
# Copy the entire repository layout
COPY . .
# Target the specific web project file inside your src directory for direct output flattening
RUN dotnet publish src/MoogleAPI.Web/MoogleAPI.Web.csproj -c Release -o out
# Runtime Stage
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app
COPY --from=build /app/out .
# Handle the dynamic port mapping via an env fallback inside the container
ENV ASPNETCORE_HTTP_PORTS=8080
ENTRYPOINT ["dotnet", "MoogleAPI.Web.dll"]