Skip to content

Commit 3ac0b78

Browse files
committed
Try to use consistent project name
1 parent 8c4d92e commit 3ac0b78

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

docs/containers/container-tools-react.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.custom: SEO-VS-2020
55
author: ghogen
66
description: Learn how to create a containerized React SPA app with Visual Studio Container Tools and Docker
77
ms.author: ghogen
8-
ms.date: 10/25/2021
8+
ms.date: 08/25/2022
99
ms.technology: vs-container-tools
1010
ms.topic: quickstart
1111
---
@@ -40,7 +40,6 @@ For Docker installation, first review the information at [Docker Desktop for Win
4040

4141
## Create a project and add Docker support
4242

43-
4443
::: moniker range="vs-2019"
4544

4645
1. Create a new project using the **ASP.NET Core with React.js** template.
@@ -114,19 +113,19 @@ RUN apt-get install -y libpng-dev libjpeg-dev curl libxi6 build-essential libgl1
114113
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
115114
RUN apt-get install -y nodejs
116115
WORKDIR /src
117-
COPY ["ReactSPA/ReactSPA.csproj", "ReactSPA/"]
118-
RUN dotnet restore "ReactSPA/ReactSPA.csproj"
116+
COPY ["ProjectSPA1/ProjectSPA1.csproj", "ProjectSPA1/"]
117+
RUN dotnet restore "ProjectSPA1/ProjectSPA1.csproj"
119118
COPY . .
120-
WORKDIR "/src/ReactSPA"
121-
RUN dotnet build "ReactSPA.csproj" -c Release -o /app/build
119+
WORKDIR "/src/ProjectSPA1"
120+
RUN dotnet build "ProjectSPA1.csproj" -c Release -o /app/build
122121

123122
FROM build AS publish
124-
RUN dotnet publish "ReactSPA.csproj" -c Release -o /app/publish
123+
RUN dotnet publish "ProjectSPA1.csproj" -c Release -o /app/publish
125124

126125
FROM base AS final
127126
WORKDIR /app
128127
COPY --from=publish /app/publish .
129-
ENTRYPOINT ["dotnet", "ReactSPA.dll"]
128+
ENTRYPOINT ["dotnet", "ProjectSPA1.dll"]
130129
```
131130

132131
:::moniker-end
@@ -152,19 +151,19 @@ RUN apt-get install -y libpng-dev libjpeg-dev curl libxi6 build-essential libgl1
152151
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
153152
RUN apt-get install -y nodejs
154153
WORKDIR /src
155-
COPY ["ReactSPA/ReactSPA.csproj", "ReactSPA/"]
156-
RUN dotnet restore "ReactSPA/ReactSPA.csproj"
154+
COPY ["ProjectSPA1/ProjectSPA1.csproj", "ProjectSPA1/"]
155+
RUN dotnet restore "ProjectSPA1/ProjectSPA1.csproj"
157156
COPY . .
158-
WORKDIR "/src/ReactSPA"
159-
RUN dotnet build "ReactSPA.csproj" -c Release -o /app/build
157+
WORKDIR "/src/ProjectSPA1"
158+
RUN dotnet build "ProjectSPA1.csproj" -c Release -o /app/build
160159

161160
FROM build AS publish
162-
RUN dotnet publish "ReactSPA.csproj" -c Release -o /app/publish
161+
RUN dotnet publish "ProjectSPA1.csproj" -c Release -o /app/publish
163162

164163
FROM base AS final
165164
WORKDIR /app
166165
COPY --from=publish /app/publish .
167-
ENTRYPOINT ["dotnet", "ReactSPA.dll"]
166+
ENTRYPOINT ["dotnet", "ProjectSPA1.dll"]
168167
```
169168

170169
:::moniker-end
@@ -225,19 +224,19 @@ Update the Dockerfile by adding the following lines. This will copy node and npm
225224
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
226225
COPY --from=downloadnodejs C:\nodejs\ C:\Windows\system32\
227226
WORKDIR /src
228-
COPY ["WebApplicationReact1/WebApplicationReact1.csproj", "WebApplicationReact1/"]
229-
RUN dotnet restore "WebApplicationReact1/WebApplicationReact1.csproj"
227+
COPY ["ProjectSPA1/ProjectSPA1.csproj", "ProjectSPA1/"]
228+
RUN dotnet restore "ProjectSPA1/ProjectSPA1.csproj"
230229
COPY . .
231-
WORKDIR "/src/WebApplicationReact1"
232-
RUN dotnet build "WebApplicationReact1.csproj" -c Release -o /app/build
230+
WORKDIR "/src/ProjectSPA1"
231+
RUN dotnet build "ProjectSPA1.csproj" -c Release -o /app/build
233232

234233
FROM build AS publish
235-
RUN dotnet publish "WebApplicationReact1.csproj" -c Release -o /app/publish
234+
RUN dotnet publish "ProjectSPA1.csproj" -c Release -o /app/publish
236235

237236
FROM base AS final
238237
WORKDIR /app
239238
COPY --from=publish /app/publish .
240-
ENTRYPOINT ["dotnet", "WebApplicationReact1.dll"]
239+
ENTRYPOINT ["dotnet", "ProjectSPA1.dll"]
241240
```
242241

243242
:::moniker-end
@@ -402,7 +401,6 @@ You can also view the images and inspect information about them. Choose the **Im
402401

403402
Once the develop and debug cycle of the app is completed, you can create a production image of the app.
404403

405-
406404
:::moniker range="vs-2019"
407405

408406
1. Change the configuration drop-down to **Release** and build the app.

0 commit comments

Comments
 (0)