-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
31 lines (21 loc) · 772 Bytes
/
dockerfile
File metadata and controls
31 lines (21 loc) · 772 Bytes
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
30
31
# ChatGPT made the first version of this, hopefully it works!
# Start with the official .NET 10.0 SDK image
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build-env
# Set the working directory to the app's source code directory
WORKDIR /app
# Copy the app's source code to the container image
COPY . .
# Restore the app's dependencies
RUN dotnet restore
# Build the app
RUN dotnet publish -c Release -o out
# Start with a smaller runtime image for the final image
FROM mcr.microsoft.com/dotnet/aspnet:10.0
# Set the working directory to the app's output directory
WORKDIR /app
# Copy the app's output files from the build-env image
COPY --from=build-env /app/out .
# Expose the app's port (if needed)
EXPOSE 80
# Start the app
ENTRYPOINT ["dotnet", "Valour.Web.dll"]