Skip to content

Commit 8a66725

Browse files
committed
Update Dockerfile
1 parent bade0bc commit 8a66725

File tree

3 files changed

+4
-36
lines changed

3 files changed

+4
-36
lines changed

Dockerfile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
2+
COPY src /app
23
WORKDIR /app
34

4-
# copy csproj and restore as distinct layers
5-
COPY src/*.sln .
6-
COPY src/Northwind/*.csproj ./Northwind/
7-
COPY src/Northwind.ServiceInterface/*.csproj ./Northwind.ServiceInterface/
8-
COPY src/Northwind.ServiceModel/*.csproj ./Northwind.ServiceModel/
95
RUN dotnet restore
10-
11-
# copy everything else and build app
12-
COPY src/Northwind/. ./Northwind/
13-
COPY src/Northwind.ServiceInterface/. ./Northwind.ServiceInterface/
14-
COPY src/Northwind.ServiceModel/. ./Northwind.ServiceModel/
15-
WORKDIR /app/Northwind
166
RUN dotnet publish -c Release -o out
177

8+
# Build runtime image
189
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
1910
WORKDIR /app
20-
COPY --from=build /app/Northwind/out ./
11+
COPY --from=build /app/out .
2112
ENV ASPNETCORE_URLS http://*:5000
22-
ENTRYPOINT ["dotnet", "Northwind.dll"]
13+
ENTRYPOINT ["dotnet", "Northwind.dll"]

src/Northwind/web.config

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/NuGet.Config

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)