From 94fd312fccaa5b740b50b33a2b5b734baa6cec2b Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Sun, 2 Feb 2025 14:01:55 +0100 Subject: [PATCH 1/3] prepare conf for azurelinux --- scenarios/tls.benchmarks.yml | 16 +++++++++++ .../TLS/Kestrel/Dockerfile.azurelinux | 27 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux diff --git a/scenarios/tls.benchmarks.yml b/scenarios/tls.benchmarks.yml index 2d8bd9ac1..3f8b923c0 100644 --- a/scenarios/tls.benchmarks.yml +++ b/scenarios/tls.benchmarks.yml @@ -208,6 +208,22 @@ scenarios: - OPENSSL_VERSION="3.0.15-r1" # lookup for openssl+branch version here https://pkgs.alpinelinux.org/packages?name=openssl&branch=v3.20&repo=&arch=x86_64 - ALPINE_BRANCH="v3.17" + load: + job: httpclient + variables: + path: /hello-world + serverPort: 8080 + presetHeaders: connectionclose + connections: 32 + serverScheme: https + sslProtocol: tls12 + + tls-handshakes-docker-azurelinux: + application: + job: dockerLinuxKestrelServer + variables: + # openssl version is already pre-installed with base image + dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux load: job: httpclient variables: diff --git a/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux b/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux new file mode 100644 index 000000000..c549a85f3 --- /dev/null +++ b/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux @@ -0,0 +1,27 @@ +FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS base +USER root +WORKDIR /app +EXPOSE 8080 +EXPOSE 8081 + +# This stage is used to build the service project +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["Kestrel.csproj", "."] +RUN dotnet restore "./Kestrel.csproj" +COPY . . +WORKDIR "/src/." +RUN dotnet build "./Kestrel.csproj" -c $BUILD_CONFIGURATION -o /app/build + +# This stage is used to publish the service project to be copied to the final stage +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./Kestrel.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +# This stage is used in production or when running from VS in regular mode +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . + +ENTRYPOINT [ "dotnet", "Kestrel.dll" ] From ff9b531f2a6fd9fe4fed560e8ccc6deeccdc5121 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Sun, 2 Feb 2025 14:16:27 +0100 Subject: [PATCH 2/3] correct base image --- src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux b/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux index c549a85f3..1be70dc4b 100644 --- a/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux +++ b/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0-azurelinux3.0 AS base USER root WORKDIR /app EXPOSE 8080 From 9a3ea4ae79d7edd6e7216619acb4c890c162cab7 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Sun, 2 Feb 2025 14:25:02 +0100 Subject: [PATCH 3/3] fix dockerfile use --- scenarios/tls.benchmarks.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scenarios/tls.benchmarks.yml b/scenarios/tls.benchmarks.yml index 3f8b923c0..6338a587e 100644 --- a/scenarios/tls.benchmarks.yml +++ b/scenarios/tls.benchmarks.yml @@ -221,9 +221,8 @@ scenarios: tls-handshakes-docker-azurelinux: application: job: dockerLinuxKestrelServer - variables: - # openssl version is already pre-installed with base image - dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux + # openssl version is already pre-installed with base image (latest) + dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.azurelinux load: job: httpclient variables: