forked from DataDog/dd-apm-test-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.windows
More file actions
38 lines (30 loc) · 1.33 KB
/
Copy pathDockerfile.windows
File metadata and controls
38 lines (30 loc) · 1.33 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
# escape=`
FROM python:3.13-windowsservercore
WORKDIR /src
EXPOSE 8126
# The agent binds to loopback by default. In a container the published port
# (EXPOSE 8126 / -p 8126:8126) is only reachable if the agent binds all
# interfaces, so opt in explicitly here.
ENV HOST=0.0.0.0
ENV SNAPSHOT_CI=1
ENV LOG_LEVEL=INFO
ENV SNAPSHOT_DIR=C:\snapshots
ENV VCR_CASSETTES_DIRECTORY=C:\vcr-cassettes
# Install git (required for setuptools_scm)
RUN powershell -Command `
Invoke-WebRequest -Uri 'https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/MinGit-2.47.1-64-bit.zip' -OutFile 'mingit.zip'; `
Expand-Archive -Path 'mingit.zip' -DestinationPath 'C:\git'; `
Remove-Item 'mingit.zip'; `
[Environment]::SetEnvironmentVariable('PATH', $env:PATH + ';C:\git\cmd', [EnvironmentVariableTarget]::Machine)
# Create directories
RUN powershell -Command `
New-Item -ItemType Directory -Force -Path C:\snapshots; `
New-Item -ItemType Directory -Force -Path C:\vcr-cassettes
ADD vcr-cassettes C:\vcr-cassettes
# Add only necessary files to speed up development builds
ADD README.md setup.py test_deps.txt ./
ADD ddapm_test_agent ./ddapm_test_agent
ADD .git ./.git
RUN pip install /src
RUN powershell -Command "Remove-Item -Path $env:LOCALAPPDATA\pip\Cache -Recurse -Force -ErrorAction SilentlyContinue"
CMD ["ddapm-test-agent"]