Skip to content

Commit

Permalink
updated samples
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Jul 27, 2024
1 parent de9394e commit e3ff071
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<TargetFrameworks>netstandard2.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<SamplesTargetFrameworks>net7.0</SamplesTargetFrameworks>
<SamplesTargetFrameworks>net8.0</SamplesTargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<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>
Expand Down
4 changes: 2 additions & 2 deletions samples/WebSocketPushServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app

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

# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "WebSocketPushServer.dll"]
1 change: 0 additions & 1 deletion samples/WebSocketPushServer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ services:
image: kerryjiang/websocket_pushserver
ports:
- "4040:4040"

16 changes: 16 additions & 0 deletions samples/WebSocketServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "WebSocketServer.dll"]
6 changes: 6 additions & 0 deletions samples/WebSocketServer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '2.0'
services:
websocketserver:
image: kerryjiang/websocket_echoserver
ports:
- "4040:4040"

0 comments on commit e3ff071

Please sign in to comment.