-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
22 lines (18 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2019
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV VERSION 2.5.5
ENV LIBRESSLPATH C:\libressl
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$Env:VERSION-windows.zip" -OutFile libressl.zip -UseBasicParsing ; `
Expand-Archive libressl.zip -DestinationPath $Env:Temp ; `
New-Item -ItemType Directory -Path $Env:LIBRESSLPATH ; `
Copy-Item $Env:Temp\libressl-$Env:VERSION-windows\x64\* $Env:LIBRESSLPATH\. ; `
Remove-Item $Env:LIBRESSLPATH\*.pdb ; `
$newPath = ('{0};{1}' -f $Env:LIBRESSLPATH, $Env:PATH); `
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $newPath ; `
Remove-Item $Env:Temp\libressl-$Env:VERSION-windows, libressl.zip -Force -Recurse ; `
New-Item -ItemType Directory -Path $Env:LIBRESSLPATH\ssl
COPY openssl.cnf $LIBRESSLPATH/ssl/.
COPY generate-certs.ps1 generate-certs.ps1
CMD . .\generate-certs.ps1