Skip to content

Commit be070ac

Browse files
committed
Next Windows subset
1 parent 1a339b9 commit be070ac

File tree

11 files changed

+81
-67
lines changed

11 files changed

+81
-67
lines changed

.github/workflows/build-windows-deps.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
1312
build-windows-deps-2019:
1413
runs-on: windows-2019
1514
steps:
@@ -24,6 +23,9 @@ jobs:
2423
- uses: ./.github/actions/build
2524
with:
2625
filter: windows-deps
26+
- uses: ./.github/actions/build
27+
with:
28+
filter: mssql
2729

2830
build-windows-deps-2022:
2931
runs-on: windows-2022
@@ -39,6 +41,9 @@ jobs:
3941
- uses: ./.github/actions/build
4042
with:
4143
filter: windows-deps
44+
- uses: ./.github/actions/build
45+
with:
46+
filter: mssql
4247

4348
build-windows-deps-2025:
4449
runs-on: windows-2025
@@ -53,4 +58,7 @@ jobs:
5358
- uses: actions/checkout@master
5459
- uses: ./.github/actions/build
5560
with:
56-
filter: windows-deps
61+
filter: windows-deps
62+
- uses: ./.github/actions/build
63+
with:
64+
filter: mssql

build/compose-images-tags.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434

3535
postgres-12:
3636
image: diamol/postgres:2e-12-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
37-
37+
3838
postgres-13:
3939
image: diamol/postgres:2e-13-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
4040

@@ -48,11 +48,11 @@ services:
4848
image: diamol/gogs:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
4949

5050
jenkins:
51-
image: diamol/jenkins:2e-${DOCKER_BUILD_OS}-${DOCKER_BUILD_CPU}
51+
image: diamol/jenkins:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
5252

5353
mssql:
5454
image: diamol/mssql:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
55-
55+
5656
trivy:
5757
image: diamol/trivy:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
5858

@@ -84,4 +84,4 @@ services:
8484
image: diamol/nats:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
8585

8686
nats-sub:
87-
image: diamol/nats-sub:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}
87+
image: diamol/nats-sub:2e-${DOCKER_BUILD_OS}${OS_VERSION_TAG}-${DOCKER_BUILD_CPU}

build/compose-images-windows.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ services:
116116
SQLPACKAGE_DOWNLOAD_URL: ${SQLPACKAGE_WINDOWS_DOWNLOAD_URL}
117117

118118
#TODO
119-
#trivy:
120-
# build:
121-
# context: ../images/trivy/windows
119+
trivy:
120+
build:
121+
context: ../images/trivy/windows
122+
args:
123+
WINDOWS_VERSION: ${WINDOWS_VERSION}
122124

123125
fluentd:
124126
build:
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[
2-
"golang",
3-
"registry",
4-
"dotnet-runtime",
5-
"dotnet-sdk",
6-
"dotnet-aspnet",
7-
"postgres-12",
8-
"postgres-13"
2+
"prometheus",
3+
"grafana",
4+
"gogs",
5+
"jenkins",
6+
"trivy"
97
]

images/gogs/windows/Dockerfile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@ FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION} AS base
44

55
FROM base AS installer
66
ARG GOGS_VERSION
7-
ARG GOGS_WINDOWS_DOWNLOAD_SHA256
8-
97
RUN echo "Downloading Gogs version: %GOGS_VERSION%" && `
108
curl -sSL -o gogs.zip "https://dl.gogs.io/%GOGS_VERSION%/gogs_%GOGS_VERSION%_windows_amd64.zip"
11-
12-
# TODO - use this for checksum? https://github.com/cwansart/sha256sum.exe
13-
# RUN if ((Get-FileHash gogs.zip -Algorithm sha256).Hash.ToLower() -ne $env:GOGS_WINDOWS_DOWNLOAD_SHA256) {exit 1}
14-
15-
RUN echo 'Expanding Gogs...' && `
16-
mkdir gogs && `
17-
cd gogs && `
18-
tar -xvf ../gogs.zip
9+
WORKDIR /gogs
10+
RUN tar -xf /gogs.zip --strip-components 1
1911

2012
# Git
2113
ARG WINDOWS_VERSION
@@ -26,7 +18,7 @@ FROM base
2618

2719
EXPOSE 3000
2820
VOLUME C:\data C:\logs C:\repositories
29-
CMD ["gogs", "web"]
21+
CMD [".\gogs", "web"]
3022

3123
USER ContainerAdministrator
3224
RUN setx /M PATH "%PATH%;C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;"

images/grafana/windows/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# escape=`
22
ARG WINDOWS_VERSION
3-
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION} AS base
3+
FROM diamol/windows-deps:2e-windows-${WINDOWS_VERSION}-amd64 AS windows-deps
44

5-
FROM base AS installer
5+
ARG WINDOWS_VERSION
6+
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION} AS installer
67
ARG GRAFANA_VERSION
7-
ARG GRAFANA_WINDOWS_DOWNLOAD_SHA256
8-
8+
USER ContainerAdministrator
99
RUN echo "Downloading Grafana version: %GRAFANA_VERSION%" && `
1010
curl -sSL -o grafana.zip "https://dl.grafana.com/oss/release/grafana-%GRAFANA_VERSION%.windows-amd64.zip"
11-
# if ((Get-FileHash grafana.zip -Algorithm sha256).Hash.ToLower() -ne $env:GRAFANA_WINDOWS_DOWNLOAD_SHA256) {exit 1}
12-
1311
WORKDIR /grafana
14-
RUN tar -xvf /grafana.zip --strip-components 1
12+
RUN tar -xf /grafana.zip --strip-components 1
1513

1614
# Grafana
17-
FROM base
15+
ARG WINDOWS_VERSION
16+
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION}
17+
1818
EXPOSE 3000
1919

2020
WORKDIR C:\grafana\bin
@@ -32,4 +32,5 @@ ENV GF_AUTH_ANONYMOUS_ENABLED=true `
3232
GF_AUTH_DISABLE_LOGIN_FORM=true `
3333
GF_USERS_DEFAULT_THEME=light
3434

35-
COPY --from=installer C:\grafana C:\grafana
35+
COPY --from=installer C:\grafana C:\grafana
36+
COPY --from=windows-deps /netapi32.dll /windows/system32/netapi32.dll

images/jenkins/windows/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# escape=`
22
ARG WINDOWS_VERSION
3-
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION} AS installer
4-
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
3+
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION} AS installer
4+
USER ContainerAdministrator
55

66
ARG JENKINS_VERSION
7+
ARG DOCKER_VERSION=27.4.1
78

9+
RUN echo "Downloading Docker version: %DOCKER_VERSION%" && `
10+
curl.exe -o docker.zip -sSL https://download.docker.com/win/static/stable/x86_64/docker-%DOCKER_VERSION%.zip
811
WORKDIR /docker
9-
RUN curl.exe -o docker.zip -sSL https://download.docker.com/win/static/stable/x86_64/docker-27.4.1.zip; `
10-
Expand-Archive -Path docker.zip -DestinationPath / -Force
12+
RUN tar -xf /docker.zip --strip-components 1
1113

1214
WORKDIR /jenkins
13-
RUN Write-Host "Downloading Jenkins version: $env:JENKINS_VERSION"; `
14-
curl.exe -o jenkins.war -sSL "https://get.jenkins.io/war-stable/$($env:JENKINS_VERSION)/jenkins.war"
15+
RUN echo "Downloading Jenkins version: %JENKINS_VERSION%" && `
16+
curl.exe -o jenkins.war -sSL "https://get.jenkins.io/war-stable/%JENKINS_VERSION%/jenkins.war"
1517

1618
# Git
1719
ARG WINDOWS_VERSION
@@ -25,11 +27,11 @@ ENV JENKINS_VERSION=${JENKINS_VERSION} `
2527
JENKINS_HOME="C:\data"
2628

2729
COPY --from=git /git/ /git
28-
COPY --from=installer /docker/ /docker
30+
COPY --from=installer /docker/docker.exe /docker
2931
COPY --from=installer /jenkins/ /jenkins
3032

3133
EXPOSE 8080
32-
ENTRYPOINT java -Duser.home=${JENKINS_HOME} -Djenkins.install.runSetupWizard=false -jar /jenkins/jenkins.war
34+
ENTRYPOINT java -Duser.home=${JENKINS_HOME} -Djenkins.install.runSetupWizard=false -jar /jenkins/jenkins.war --enable-future-java
3335

3436
USER ContainerAdministrator
3537
RUN setx /M PATH "%PATH%;C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;C:\docker;"

images/prometheus/windows/Dockerfile

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
# escape=`
22
ARG WINDOWS_VERSION
3-
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION} AS installer
4-
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
3+
FROM diamol/windows-deps:2e-windows-${WINDOWS_VERSION}-amd64 AS windows-deps
54

5+
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION} AS installer
66
ARG PROMETHEUS_VERSION
7-
ARG PROMETHEUS_WINDOWS_DOWNLOAD_SHA256
8-
9-
RUN Write-Host "Downloading Prometheus version: $env:PROMETHEUS_VERSION"; `
10-
Invoke-WebRequest "https://github.com/prometheus/prometheus/releases/download/v$($env:PROMETHEUS_VERSION)/prometheus-$($env:PROMETHEUS_VERSION).windows-amd64.zip" -OutFile 'prometheus.tar.gz' -UseBasicParsing; `
11-
if ((Get-FileHash prometheus.tar.gz -Algorithm sha256).Hash.ToLower() -ne $env:PROMETHEUS_WINDOWS_DOWNLOAD_SHA256) {exit 1}
12-
13-
14-
RUN mkdir "C:\prometheus-$($env:PROMETHEUS_VERSION).windows-amd64"; `
15-
tar xf prometheus.tar.gz; `
16-
Rename-Item -Path "C:\prometheus-$($env:PROMETHEUS_VERSION).windows-amd64" -NewName 'C:\prometheus'
7+
USER ContainerAdministrator
8+
RUN echo "Downloading Prometheus version: %PROMETHEUS_VERSION%" && `
9+
curl -sSL -o prometheus.zip "https://github.com/prometheus/prometheus/releases/download/v%PROMETHEUS_VERSION%/prometheus-%PROMETHEUS_VERSION%.windows-amd64.zip"
10+
WORKDIR /prometheus
11+
RUN tar -xf /prometheus.zip --strip-components 1
1712

1813
# Prometheus
19-
ARG WINDOWS_VERSION
2014
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION}
2115

22-
COPY --from=installer /windows/system32/netapi32.dll /windows/system32/netapi32.dll
23-
COPY --from=installer /prometheus/prometheus.exe /bin/prometheus.exe
24-
COPY --from=installer /prometheus/promtool.exe /bin/promtool.exe
25-
COPY --from=installer /prometheus/prometheus.yml /etc/prometheus/prometheus.yml
26-
COPY --from=installer /prometheus/console_libraries/ /etc/prometheus/
27-
COPY --from=installer /prometheus/consoles/ /etc/prometheus/
16+
COPY --from=windows-deps /netapi32.dll /windows/system32/netapi32.dll
17+
COPY --from=installer /prometheus/prometheus.exe /bin/prometheus.exe
18+
COPY --from=installer /prometheus/promtool.exe /bin/promtool.exe
19+
COPY --from=installer /prometheus/prometheus.yml /etc/prometheus/prometheus.yml
20+
COPY --from=installer /prometheus/console_libraries/ /etc/prometheus/
21+
COPY --from=installer /prometheus/consoles/ /etc/prometheus/
2822

2923
EXPOSE 9090
3024
VOLUME C:\prometheus

images/traefik/windows/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ FROM diamol/base
33
EXPOSE 80 443
44
ENTRYPOINT ["/traefik"]
55

6-
COPY --from=traefik:v2.1.1-windowsservercore-1809 /windows/system32/netapi32.dll /windows/system32/netapi32.dll
7-
COPY --from=traefik:v2.1.1-windowsservercore-1809 /traefik.exe /traefik.exe
6+
COPY --from=traefik:v2.1.1-windowsservercore-1809 /netapi32.dll /windows/system32/netapi32.dll
7+
COPY --from=traefik:v2.1.1-windowsservercore-1809 /traefik.exe /traefik.exe

images/trivy/windows/Dockerfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
# TODO
1+
# escape=`
2+
ARG WINDOWS_VERSION
3+
4+
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION} AS installer
5+
ARG TRIVY_VERSION
6+
USER ContainerAdministrator
7+
RUN echo "Downloading Trivy version: %TRIVY_VERSION%" && `
8+
curl -sSL -o trivy.zip "https://github.com/aquasecurity/trivy/releases/download/v%TRIVY_VERSION%/trivy_%TRIVY_VERSION%_windows-64bit.zip"
9+
WORKDIR /trivy
10+
RUN tar -xf /trivy.zip
11+
12+
# Trivy
13+
FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION}
14+
15+
CMD [ "trivy.exe" ]
16+
COPY --from=installer /trivy /trivy
17+
18+
USER ContainerAdministrator
19+
RUN setx /M PATH "%PATH%;C:\trivy"

0 commit comments

Comments
 (0)