Skip to content

Commit d0e0e56

Browse files
committed
base on alpine!
1 parent 5814aa7 commit d0e0e56

File tree

3 files changed

+24
-51
lines changed

3 files changed

+24
-51
lines changed

scenarios/tls.benchmarks.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
dockerKestrel:
4040
repository: https://github.com/deaglegross/benchmarks.git
4141
branchOrCommit: dmkorolev/idna/openssl-versioning
42-
dockerFile: # provided by job
42+
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile
4343
dockerImageName: kestrel
4444
dockerContextDirectory: dockerKestrel/src/BenchmarksApps/TLS/Kestrel
4545
port: 8080
@@ -152,11 +152,15 @@ scenarios:
152152
certPwd: testPassword
153153

154154
# Kestrel in Docker
155-
tls-handshakes-docker-openssl-default:
155+
tls-handshakes-docker-openssl-332:
156156
application:
157157
job: dockerLinuxKestrelServer
158-
variables:
159-
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.default
158+
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.default
159+
buildArguments:
160+
# openssl version to install
161+
- OPENSSL_VERSION="3.3.2-r4"
162+
# lookup for openssl+branch version here https://pkgs.alpinelinux.org/packages?name=openssl&branch=v3.20&repo=&arch=x86_64
163+
- ALPINE_BRANCH="v3.21"
160164
load:
161165
job: httpclient
162166
variables:
@@ -169,7 +173,11 @@ scenarios:
169173
tls-handshakes-docker-openssl-111:
170174
application:
171175
job: dockerLinuxKestrelServer
172-
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.openssl111
176+
buildArguments:
177+
# openssl version to install
178+
- OPENSSL_VERSION="1.1.1w-r1"
179+
# lookup for openssl+branch version here https://pkgs.alpinelinux.org/packages?name=openssl&branch=v3.20&repo=&arch=x86_64
180+
- ALPINE_BRANCH="v3.16"
173181
load:
174182
job: httpclient
175183
variables:

src/BenchmarksApps/TLS/Kestrel/Dockerfile.default renamed to src/BenchmarksApps/TLS/Kestrel/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# This stage is used when running from VS in fast mode (Default for Debug configuration)
2-
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
2+
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS base
33
USER root
44
WORKDIR /app
55
EXPOSE 8080
66
EXPOSE 8081
77

8+
# Define a build argument for the OpenSSL version
9+
# lookup for openssl+branch version here https://pkgs.alpinelinux.org/packages?name=openssl&branch=v3.20&repo=&arch=x86_64
10+
ARG OPENSSL_VERSION=1.1.1w-r1
11+
ARG ALPINE_BRANCH=v3.16
12+
13+
# Add the specified Alpine branch repository and install OpenSSL
14+
RUN echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_BRANCH}/main" >> /etc/apk/repositories && \
15+
apk add --no-cache openssl=${OPENSSL_VERSION} wget perl build-base && \
16+
rm -rf /var/lib/apt/lists/*
17+
818
# This stage is used to build the service project
919
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
1020
ARG BUILD_CONFIGURATION=Release

src/BenchmarksApps/TLS/Kestrel/Dockerfile.openssl111

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)