Skip to content

Commit 59f2253

Browse files
committed
Add Dockerfile
1 parent ed959c9 commit 59f2253

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
2+
WORKDIR /app
3+
EXPOSE 80
4+
EXPOSE 433
5+
6+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
7+
WORKDIR /src
8+
COPY ["DBAccess.csproj", "."]
9+
RUN dotnet restore "DBAccess.csproj"
10+
COPY . .
11+
RUN dotnet build "DBAccess.csproj" -c Release -o /app/build
12+
13+
FROM build AS publish
14+
RUN dotnet publish "DBAccess.csproj" -c Release -o /app/publish
15+
16+
FROM base AS final
17+
WORKDIR /app
18+
COPY --from=publish /app/publish .
19+
ENTRYPOINT ["dotnet", "DBAccess.dll"]

0 commit comments

Comments
 (0)