Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 31278f0

Browse files
committedMar 13, 2025·
Fix netapi load for deps
1 parent 274207c commit 31278f0

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed
 

‎.github/workflows/push-manifests.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: images-push-manifests
1+
name: push-manifests
22

33
on:
44
push:
@@ -33,5 +33,5 @@ jobs:
3333
- name: Push chapter manifests
3434
uses: ./.github/actions/push-manifests
3535
with:
36-
images: 'false'
37-
chapters: 'true'
36+
images: "false"
37+
chapters: "true"

‎build/.env

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ NGINX_VERSION=1.27.4
4040
TRAEFIK_VERSION=2.11.21
4141
REDIS_VERSION=7.4.2
4242
NATS_VERSION=2.10.26
43-
LIBRESSL_VERSION=2.5.5
43+
LIBRESSL_VERSION=2.5.5
44+
WINDOWS_NETAPI_SKU=servercore

‎build/build.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ try {
3535
if ($env:DOCKER_BUILD_OS -eq 'windows') {
3636
$env:WINDOWS_VERSION='ltsc2019'
3737
$env:WINDOWS_VERSION_CODE='1809'
38+
$env:WINDOWS_NETAPI_SKU='servercore'
3839
$winver=(Get-Item "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue('DisplayVersion')
3940
echo "** winver: $winver **"
4041
# yuck - https://www.gaijin.at/en/infos/windows-version-numbers
@@ -45,6 +46,7 @@ try {
4546
}
4647
elseif ($version -eq '10.0.26100.0') {
4748
$env:WINDOWS_VERSION = $env:WINDOWS_VERSION_CODE ='ltsc2025'
49+
$env:WINDOWS_NETAPI_SKU = 'nanoserver'
4850
}
4951
$env:OS_VERSION_TAG="-$env:WINDOWS_VERSION"
5052
}

‎build/compose-images-windows.yml

+13-17
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ services:
88
GIT_WINDOWS_VERSION: ${GIT_WINDOWS_VERSION}
99
GIT_WINDOWS_RELEASE_NUMBER: ${GIT_WINDOWS_RELEASE_NUMBER}
1010
GIT_WINDOWS_DOWNLOAD_SHA256: ${GIT_WINDOWS_DOWNLOAD_SHA256}
11+
WINDOWS_NETAPI_SKU: ${WINDOWS_NETAPI_SKU}
1112

1213
base:
1314
build:
@@ -48,8 +49,6 @@ services:
4849
args:
4950
WINDOWS_VERSION: ${WINDOWS_VERSION}
5051
GIT_VERSION: ${GIT_VERSION}
51-
GIT_WINDOWS_RELEASE_NUMBER: ${GIT_WINDOWS_RELEASE_NUMBER}
52-
GIT_WINDOWS_DOWNLOAD_SHA256: ${GIT_WINDOWS_DOWNLOAD_SHA256}
5352

5453
dotnet-runtime:
5554
build:
@@ -88,21 +87,18 @@ services:
8887
context: ../images/prometheus/windows
8988
args:
9089
WINDOWS_VERSION: ${WINDOWS_VERSION}
91-
PROMETHEUS_WINDOWS_DOWNLOAD_SHA256: ${PROMETHEUS_WINDOWS_DOWNLOAD_SHA256}
9290

9391
grafana:
9492
build:
9593
context: ../images/grafana/windows
9694
args:
9795
WINDOWS_VERSION: ${WINDOWS_VERSION}
98-
GRAFANA_WINDOWS_DOWNLOAD_SHA256: ${GRAFANA_WINDOWS_DOWNLOAD_SHA256}
9996

10097
gogs:
10198
build:
10299
context: ../images/gogs/windows
103100
args:
104101
WINDOWS_VERSION: ${WINDOWS_VERSION}
105-
GOGS_WINDOWS_DOWNLOAD_SHA256: ${GOGS_WINDOWS_DOWNLOAD_SHA256}
106102

107103
jenkins:
108104
build:
@@ -119,7 +115,7 @@ services:
119115
MSSQL_VERSION_CODE: ${MSSQL_VERSION_CODE}
120116
MSSQL_INSTANCE_NAME: ${MSSQL_INSTANCE_NAME}
121117
SQLPACKAGE_DOWNLOAD_URL: ${SQLPACKAGE_WINDOWS_DOWNLOAD_URL}
122-
118+
123119
#TODO
124120
#trivy:
125121
# build:
@@ -131,17 +127,17 @@ services:
131127
args:
132128
WINDOWS_VERSION: ${WINDOWS_VERSION}
133129

134-
# TODO
135-
# elasticsearch:
136-
# build:
137-
# context: ../images/elasticsearch/linux
138-
# args:
139-
# DOCKER_BUILD_CPU_ALT: ${DOCKER_BUILD_CPU_ALT}
130+
# TODO
131+
# elasticsearch:
132+
# build:
133+
# context: ../images/elasticsearch/linux
134+
# args:
135+
# DOCKER_BUILD_CPU_ALT: ${DOCKER_BUILD_CPU_ALT}
140136

141-
# TODO
142-
# kibana:
137+
# TODO
138+
# kibana:
143139

144-
# nginx:
140+
# nginx:
145141

146142
cert-generator:
147143
build:
@@ -150,6 +146,6 @@ services:
150146
WINDOWS_VERSION: ${WINDOWS_VERSION}
151147
LIBRESSL_VERSION: ${LIBRESSL_VERSION}
152148

153-
# redis
149+
# redis
154150

155-
# nats
151+
# nats

‎images/windows-deps/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#escape=`
22
ARG WINDOWS_VERSION
3+
ARG WINDOWS_NETAPI_SKU
4+
35
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION} AS servercore
46
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
57

6-
78
FROM servercore AS vcredist
89
RUN Invoke-WebRequest -OutFile VC_redist.x64.exe 'https://aka.ms/vs/17/release/VC_redist.x64.exe'
910
RUN Start-Process .\VC_redist.x64.exe -ArgumentList '/install /passive /norestart' -Wait
@@ -26,13 +27,13 @@ RUN Write-Host 'Expanding Git...'; `
2627
if ((Get-FileHash git.7z.exe -Algorithm sha256).Hash.ToLower() -ne $env:GIT_WINDOWS_DOWNLOAD_SHA256) {exit 1}; `
2728
& 'C:\Program Files\7-Zip\7z.exe' x -oC:\git .\git.7z.exe
2829

30+
FROM mcr.microsoft.com/windows/${WINDOWS_NETAPI_SKU}:${WINDOWS_VERSION} AS netapi
2931

3032
# windows-deps
31-
ARG WINDOWS_VERSION
3233
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION}
3334

3435
COPY --from=git /git /git
3536
COPY --from=servercore /Windows/System32/nslookup.exe /nslookup.exe
36-
COPY --from=servercore /windows/system32/netapi32.dll /windows/system32/netapi32.dll
37+
COPY --from=netapi /windows/system32/netapi32.dll /windows/system32/netapi32.dll
3738
COPY --from=vcredist C:\windows\system32\msvcp140.dll C:\windows\system32
3839
COPY --from=vcredist C:\windows\system32\vcruntime140.dll C:\windows\system32

0 commit comments

Comments
 (0)
Please sign in to comment.