-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (18 loc) · 742 Bytes
/
Dockerfile
File metadata and controls
28 lines (18 loc) · 742 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
# Specify the .net version image to use
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
# A work directory to instructs the docker to use this path for the subsequent commands.
WORKDIR /app
# Copy the only the project file then run dotnet restore
COPY ./ .
RUN dotnet restore
RUN dotnet publish -c Release -o out
# Specify the .net version to use as runtime
FROM mcr.microsoft.com/dotnet/sdk:6.0
# A work directory to instructs the docker to use this path for the subsequent commands.
WORKDIR /app
# Copy the directory from the build-env stage into runtime image
COPY --from=build-env /app/out .
# Expose port 80 to incoming requests
EXPOSE 80
# Runs the application using project dll file.
ENTRYPOINT ["dotnet", "AdeNote.dll"]