diff --git a/Dockerfile b/Dockerfile index 4defce7..15d1bf1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,22 @@ -FROM ubuntu:22.04 as base - -# Ensure the Microsoft packages are preferred over the Ubuntu packages -RUN echo "Package: *\nPin: origin packages.microsoft.com\nPin-Priority: 1001" > /etc/apt/preferences.d/dotnet - -# Install the base packages needed to install the Microsoft packages -RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \ - curl ca-certificates \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Install the Microsoft deb -RUN curl -sSL https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \ +FROM debian:13 AS base + +# Install the base packages +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + && wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ - && rm packages-microsoft-prod.deb - -# Install MsQuic -RUN apt-get update && apt-get install -y --no-install-recommends \ - libmsquic \ + && rm packages-microsoft-prod.deb \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -FROM base as build +FROM base AS build -# Install the .NET 8 SDK -RUN apt-get update && apt-get install -y --no-install-recommends \ - dotnet-sdk-8.0 \ +# Install .NET 10 SDK on the build stage +RUN apt-get update \ + && apt-get install -y --no-install-recommends dotnet-sdk-10.0 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -37,15 +29,15 @@ RUN dotnet build -c Release FROM base -# Install the .NET 8 runtime -RUN apt-get update && apt-get install -y --no-install-recommends \ - dotnet-runtime-8.0 \ +# Install .NET 10 runtime on the final stage +RUN apt-get update \ + && apt-get install -y --no-install-recommends libmsquic dotnet-runtime-10.0 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Copy the built application from the build stage WORKDIR /app -COPY --from=build /app/src/Hello/bin/Release/net8.0/ . +COPY --from=build /app/src/Hello/bin/Release/net10.0/ . # Expose the port for the TCP and QUIC transports EXPOSE 4062/tcp diff --git a/Hello.sln b/Hello.sln deleted file mode 100644 index 0f68f47..0000000 --- a/Hello.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hello", "src\Hello\Hello.csproj", "{3475624D-FAEF-496C-BB04-D5AF9FA6246E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3475624D-FAEF-496C-BB04-D5AF9FA6246E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3475624D-FAEF-496C-BB04-D5AF9FA6246E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3475624D-FAEF-496C-BB04-D5AF9FA6246E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3475624D-FAEF-496C-BB04-D5AF9FA6246E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4A3C6DDD-1DFC-452D-936E-326C340A54FC} - EndGlobalSection -EndGlobal diff --git a/Hello.slnx b/Hello.slnx new file mode 100644 index 0000000..9a294c9 --- /dev/null +++ b/Hello.slnx @@ -0,0 +1,3 @@ + + + diff --git a/README.md b/README.md index ed2b289..64b9608 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ transports on the default port (`4062`): | Service | Path | Description | Example Clients | | ---------------------------------------------- | --------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Slice Greeter](./src//slice/Greeter.slice) | `/VisitorCenter.Greeter` | A simple service that greets visitors | [C# Slice Secure](https://github.com/icerpc/icerpc-csharp/tree/0.3.x/examples/slice/Secure/Client)
[C# Slice QUIC](https://github.com/icerpc/icerpc-csharp/tree/0.3.x/examples/slice/Quic/Client) | -| [Protobuf Greeter](./src/proto/greeter.proto) | `/visitor_center.Greeter` | A simple service that greets visitors | [C# Protobuf Secure](https://github.com/icerpc/icerpc-csharp/tree/0.3.x/examples/protobuf/Secure/Client)
[C# Protobuf QUIC](https://github.com/icerpc/icerpc-csharp/tree/0.3.x/examples/protobuf/Quic/Client) | -| [Slice Stream](./src/slice/Generator.slice) | `/StreamExample.Generator` | A service that streams data | [C# Slice Stream](https://github.com/icerpc/icerpc-csharp/tree/0.3.x/examples/slice/Stream/Client) | -| [Protobuf Stream](./src/proto/generator.proto) | `/stream_example.Generator` | A service that streams data | [C# Protobuf Stream](https://github.com/icerpc/icerpc-csharp/tree/0.3.x/examples/protobuf/Stream/Client) | +| [Slice Greeter](./src//slice/Greeter.slice) | `/VisitorCenter.Greeter` | A simple service that greets visitors | [C# Slice Secure](https://github.com/icerpc/icerpc-csharp/tree/0.5.x/examples/slice/Secure/Client)
[C# Slice QUIC](https://github.com/icerpc/icerpc-csharp/tree/0.5.x/examples/slice/Quic/Client) | +| [Protobuf Greeter](./src/proto/greeter.proto) | `/visitor_center.Greeter` | A simple service that greets visitors | [C# Protobuf Secure](https://github.com/icerpc/icerpc-csharp/tree/0.5.x/examples/protobuf/Secure/Client)
[C# Protobuf QUIC](https://github.com/icerpc/icerpc-csharp/tree/0.5.x/examples/protobuf/Quic/Client) | +| [Slice Stream](./src/slice/Generator.slice) | `/StreamExample.Generator` | A service that streams data | [C# Slice Stream](https://github.com/icerpc/icerpc-csharp/tree/0.5.x/examples/slice/Stream/Client) | +| [Protobuf Stream](./src/proto/generator.proto) | `/stream_example.Generator` | A service that streams data | [C# Protobuf Stream](https://github.com/icerpc/icerpc-csharp/tree/0.5.x/examples/protobuf/Stream/Client) | ## Running the server using Docker diff --git a/src/Hello/Hello.csproj b/src/Hello/Hello.csproj index fe37093..4979e3c 100644 --- a/src/Hello/Hello.csproj +++ b/src/Hello/Hello.csproj @@ -2,8 +2,9 @@ Exe - net8.0 - 0.1.0 + net10.0 + 14 + 0.2.0 enable true All @@ -14,15 +15,15 @@ True - - - - - - - - - + + + + + + + + +