File tree Expand file tree Collapse file tree 3 files changed +41
-4
lines changed
examples/AspNetCoreClient Expand file tree Collapse file tree 3 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 4
4
<TargetFramework >netcoreapp3.1</TargetFramework >
5
5
<AssemblyName >AspNetCoreClient</AssemblyName >
6
6
<RootNamespace >AspNetCoreClient</RootNamespace >
7
+ <UserSecretsId >069babb5-5232-4d55-bcc0-973adf2bef35</UserSecretsId >
8
+ <DockerDefaultTargetOS >Linux</DockerDefaultTargetOS >
9
+ <DockerfileContext >..\..</DockerfileContext >
7
10
</PropertyGroup >
8
11
9
12
<!-- 方便开发debug,与发布到nuget -->
13
16
<ItemGroup Condition =" '$(Configuration)' == 'Debug'" >
14
17
<ProjectReference Include =" ..\..\src\SimCaptcha.AspNetCore\SimCaptcha.AspNetCore.csproj" />
15
18
</ItemGroup >
19
+ <ItemGroup >
20
+ <PackageReference Include =" Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version =" 1.10.9" />
21
+ </ItemGroup >
16
22
17
23
18
24
</Project >
Original file line number Diff line number Diff line change
1
+ # See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
2
+
3
+ FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
4
+ WORKDIR /app
5
+ EXPOSE 80
6
+ EXPOSE 443
7
+
8
+ FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
9
+ WORKDIR /src
10
+ COPY ["examples/ASPNETCoreClient/AspNetCoreClient.csproj" , "examples/ASPNETCoreClient/" ]
11
+ COPY ["src/SimCaptcha.AspNetCore/SimCaptcha.AspNetCore.csproj" , "src/SimCaptcha.AspNetCore/" ]
12
+ COPY ["src/SimCaptcha/SimCaptcha.csproj" , "src/SimCaptcha/" ]
13
+ RUN dotnet restore "examples/ASPNETCoreClient/AspNetCoreClient.csproj"
14
+ COPY . .
15
+ WORKDIR "/src/examples/ASPNETCoreClient"
16
+ RUN dotnet build "AspNetCoreClient.csproj" -c Release -o /app/build
17
+
18
+ FROM build AS publish
19
+ RUN dotnet publish "AspNetCoreClient.csproj" -c Release -o /app/publish
20
+
21
+ FROM base AS final
22
+ WORKDIR /app
23
+ COPY --from=publish /app/publish .
24
+ ENTRYPOINT ["dotnet" , "AspNetCoreClient.dll" ]
Original file line number Diff line number Diff line change 1
- {
1
+ {
2
2
"$schema" : " http://json.schemastore.org/launchsettings.json" ,
3
3
"profiles" : {
4
4
"AspNetCoreClient" : {
5
5
"commandName" : " Project" ,
6
6
"launchBrowser" : true ,
7
7
"launchUrl" : " index.html" ,
8
- "applicationUrl" : " https://localhost:5001;http://localhost:5002" ,
9
8
"environmentVariables" : {
10
9
"ASPNETCORE_ENVIRONMENT" : " Development"
11
- }
10
+ },
11
+ "applicationUrl" : " https://localhost:5001;http://localhost:5002"
12
+ },
13
+ "Docker" : {
14
+ "commandName" : " Docker" ,
15
+ "launchBrowser" : true ,
16
+ "launchUrl" : " {Scheme}://{ServiceHost}:{ServicePort}/index.html" ,
17
+ "publishAllPorts" : true ,
18
+ "useSSL" : true
12
19
}
13
20
}
14
- }
21
+ }
You can’t perform that action at this time.
0 commit comments