Skip to content

Commit c23d0fa

Browse files
committed
Changed dockerfile restore code
1 parent 14a5c23 commit c23d0fa

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

ShowcaseProject/ShowcaseFrontend/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev
22
WORKDIR /app
33

4-
5-
COPY . .
6-
RUN dotnet restore ./ShowcaseFrontend//ShowcaseFrontend.csproj
7-
84
COPY ShowcaseFrontend/. ShowcaseFrontend/
95
WORKDIR /app/ShowcaseFrontend
10-
CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://0.0.0.0:80"]
6+
CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://+:80"]
117

128
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
139
WORKDIR /src
14-
COPY . .
10+
COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/
1511
RUN dotnet restore ./ShowcaseFrontend/ShowcaseFrontend.csproj
12+
COPY ShowcaseFrontend/. ShowcaseFrontend/
1613
WORKDIR /src/ShowcaseFrontend
1714
RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false
1815

ShowcaseProject/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
build:
1717
context: .
1818
dockerfile: ShowcaseFrontend/Dockerfile
19-
target: "dev"
19+
target: "build"
2020
container_name: showcasefrontend
2121
ports:
2222
- "8080:80"

0 commit comments

Comments
 (0)