-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.perf-comparison
More file actions
42 lines (33 loc) · 2.05 KB
/
Copy pathDockerfile.perf-comparison
File metadata and controls
42 lines (33 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM mcr.microsoft.com/dotnet/sdk:9.0
# Install Docker CLI (needed by Testcontainers to manage sibling containers)
RUN apt-get update -qq && \
apt-get install -y -qq curl zip >/dev/null 2>&1 && \
curl -fsSL https://get.docker.com | sh >/dev/null 2>&1 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Clone and build Technitium dependencies
RUN git clone --depth 1 --branch dns-server-v14.3.0 https://github.com/TechnitiumSoftware/TechnitiumLibrary.git /src/TechnitiumLibrary && \
git clone --depth 1 --branch v14.3.0 https://github.com/TechnitiumSoftware/DnsServer.git /src/DnsServer
RUN dotnet build /src/TechnitiumLibrary/TechnitiumLibrary/TechnitiumLibrary.csproj -c Release && \
dotnet build /src/TechnitiumLibrary/TechnitiumLibrary.Net/TechnitiumLibrary.Net.csproj -c Release
WORKDIR /src/DnsServer/DnsServerCore.ApplicationCommon
RUN dotnet build -c Release
# Copy app source and build the ContentFilter plugin ZIP
WORKDIR /src/app
COPY src/ContentFilter/ ./src/ContentFilter/
RUN dotnet publish src/ContentFilter/ContentFilter.csproj -c Release -o /src/app/publish && \
mkdir -p /src/app/dist && \
cd /src/app/publish && zip -r /src/app/dist/ContentFilter.zip .
# Build the Advanced Blocking App ZIP from DnsServer source
RUN dotnet publish /src/DnsServer/Apps/AdvancedBlockingApp/AdvancedBlockingApp.csproj \
-c Release -o /src/ab-publish && \
cd /src/ab-publish && zip -r /src/app/dist/AdvancedBlockingApp.zip .
# Create results directory for report output
RUN mkdir -p /results
# Copy shared test infrastructure and performance comparison project
COPY tests/ContentFilter.TestInfrastructure/ ./tests/ContentFilter.TestInfrastructure/
COPY tests/ContentFilter.PerformanceComparison/ ./tests/ContentFilter.PerformanceComparison/
WORKDIR /src/app/tests/ContentFilter.PerformanceComparison
RUN dotnet restore
# Testcontainers uses the Docker socket to launch sibling containers.
# Run with: docker run --rm -v /var/run/docker.sock:/var/run/docker.sock <image>
CMD ["dotnet", "test", "--no-restore", "--logger", "console;verbosity=detailed"]