-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 732 Bytes
/
Dockerfile
File metadata and controls
26 lines (18 loc) · 732 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
# Use the official .NET 7 SDK image as the base image
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
# Set the working directory inside the container
WORKDIR /app
# Copy the project files to the container
COPY . ./
# Build the application
RUN dotnet publish -c Release -o out
# Use the official .NET 7 runtime image as the base image for the final image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
# Set the working directory inside the container
WORKDIR /app
# Copy the published application from the build environment
COPY --from=build-env /app/out .
# Expose the port the application will run on
EXPOSE 80
# Define the entry point for the application
ENTRYPOINT ["dotnet", "AuthorService.dll"]