-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfileWindows
More file actions
44 lines (33 loc) · 1.8 KB
/
DockerfileWindows
File metadata and controls
44 lines (33 loc) · 1.8 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
43
44
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS builder
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV KURRENT_VERSION="25.1.0" `
KURRENT_HOME="C:\\kurrentdb"
# Install 7zip (no Chocolatey required)
RUN Invoke-WebRequest "https://www.7-zip.org/a/7z2406-x64.msi" -OutFile "7z.msi" -UseBasicParsing; `
Start-Process msiexec.exe -Wait -ArgumentList '/i', '7z.msi', '/quiet', '/norestart'; `
Remove-Item 7z.msi
# Download and extract KurrentDB tar.gz
RUN Invoke-WebRequest "https://github.com/kurrent-io/KurrentDB/releases/download/v25.1.0/kurrentdb-25.1.0-windows-x64.tar.gz" -OutFile "kurrentdb.tar.gz" -UseBasicParsing; `
& 'C:\Program Files\7-Zip\7z.exe' x kurrentdb.tar.gz -aoa -oC:\tmp; `
& 'C:\Program Files\7-Zip\7z.exe' x C:\tmp\kurrentdb-25.1.0-windows-x64.tar -aoa -oC:\kurrentdb; `
Remove-Item -Recurse -Force C:\tmp, kurrentdb.tar.gz
# ------------------------------------------------------------------------------
# Final image
# ------------------------------------------------------------------------------
FROM mcr.microsoft.com/windows/servercore:ltsc2022
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
# Install Visual C++ Redistributable for duckdb
RUN Invoke-WebRequest "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe" -UseBasicParsing; `
Start-Process -FilePath .\vc_redist.x64.exe -ArgumentList '/quiet', '/install', '/norestart' -Wait; `
Remove-Item vc_redist.x64.exe
ENV KURRENT_HOME="C:\\kurrentdb" `
DOTNET_RUNNING_IN_CONTAINER=true
WORKDIR $KURRENT_HOME
COPY --from=builder C:\kurrentdb\ .
COPY kurrentdb.yml .\Config\kurrentdb.yml
EXPOSE 8080 9090
VOLUME C:\Data
VOLUME C:\Logs
SHELL ["cmd", "/S", "/C"]
CMD "C:\\kurrentdb\\kurrentdb.exe --config=C:\kurrentdb\Config\kurrentdb.yml