Skip to content

Commit e779332

Browse files
committed
Build nanoserver curl image
1 parent b1ca09c commit e779332

5 files changed

Lines changed: 14 additions & 9 deletions

File tree

curl/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
FROM microsoft/windowsservercore
2-
1+
FROM microsoft/nanoserver
32

4-
ENV chocolateyUseWindowsCompression false
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
54

6-
RUN powershell -Command \
7-
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \
8-
choco install -y curl
5+
ENV CURL_VERSION 7.53.0
96

10-
# REMARK: Temporary workaround for Windows DNS client weirdness
11-
RUN powershell -command set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
7+
RUN Invoke-WebRequest $('https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/curl-{0}/curl-{0}.zip' -f $env:CURL_VERSION) -OutFile 'curl.zip' -UseBasicParsing ; \
8+
Expand-Archive curl.zip -DestinationPath C:\ ; \
9+
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord ; \
10+
Remove-Item -Path curl.zip
1211

13-
ENTRYPOINT [ "C:\\ProgramData\\chocolatey\\bin\\curl.exe" ]
12+
ENTRYPOINT [ "C:\\src\\curl.exe" ]

curl/build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build -t curl .

curl/curl-7.53.0.zip

853 KB
Binary file not shown.

curl/push.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docker tag curl stefanscherer/curl-windows
2+
docker tag curl stefanscherer/curl-windows:7.53.0
3+
docker push stefanscherer/curl-windows:7.53.0
4+
docker push stefanscherer/curl-windows

curl/test.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run curl --help

0 commit comments

Comments
 (0)