Skip to content

Commit e3ff071

Browse files
committed
updated samples
1 parent de9394e commit e3ff071

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<LangVersion>10.0</LangVersion>
55
<TargetFrameworks>netstandard2.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
6-
<SamplesTargetFrameworks>net7.0</SamplesTargetFrameworks>
6+
<SamplesTargetFrameworks>net8.0</SamplesTargetFrameworks>
77
</PropertyGroup>
88
<PropertyGroup>
99
<MobileTargetFrameworks>net7.0-ios;net7.0-android;net7.0-macos;net7.0-tvos;net8.0-ios;net8.0-android;net8.0-macos;net8.0-tvos</MobileTargetFrameworks>

samples/WebSocketPushServer/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
22
WORKDIR /app
33

44
# Copy csproj and restore as distinct layers
@@ -10,7 +10,7 @@ COPY . ./
1010
RUN dotnet publish -c Release -o out
1111

1212
# Build runtime image
13-
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
13+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
1414
WORKDIR /app
1515
COPY --from=build-env /app/out .
1616
ENTRYPOINT ["dotnet", "WebSocketPushServer.dll"]

samples/WebSocketPushServer/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ services:
44
image: kerryjiang/websocket_pushserver
55
ports:
66
- "4040:4040"
7-

samples/WebSocketServer/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
2+
WORKDIR /app
3+
4+
# Copy csproj and restore as distinct layers
5+
COPY *.csproj ./
6+
RUN dotnet restore
7+
8+
# Copy everything else and build
9+
COPY . ./
10+
RUN dotnet publish -c Release -o out
11+
12+
# Build runtime image
13+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
14+
WORKDIR /app
15+
COPY --from=build-env /app/out .
16+
ENTRYPOINT ["dotnet", "WebSocketServer.dll"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: '2.0'
2+
services:
3+
websocketserver:
4+
image: kerryjiang/websocket_echoserver
5+
ports:
6+
- "4040:4040"

0 commit comments

Comments
 (0)