Skip to content

Commit

Permalink
feat: add Windows LTSC 2022 Nano Server support
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur authored Apr 17, 2024
1 parent cce1a94 commit aba0948
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,18 @@ jobs:
- name: Test
run: .\.ci\test.ps1 -target 'servercore-ltsc2022'
shell: powershell

docker-library-winnano2022:
name: Test on windows nano server 2022
runs-on: windows-2022

steps:

- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Test
run: .\.ci\test.ps1 -target 'nanoserver-ltsc2022'
shell: powershell
1 change: 1 addition & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PLATFORMS=(
"alpine"
"scratch"
"windows/1809"
"windows/nanoserver-ltsc2022"
"windows/servercore-ltsc2022"
)

Expand Down
26 changes: 26 additions & 0 deletions windows/nanoserver-ltsc2022/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Installer image, needed for Invoke-WebRequest
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS installer
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN Invoke-WebRequest \
-Uri "https://github.com/traefik/traefik/releases/download/v3.0.0-rc5/traefik_v3.0.0-rc5_windows_amd64.zip" \
-OutFile "/traefik.zip"; \
Expand-Archive -Path "/traefik.zip" -DestinationPath "/" -Force; \
Remove-Item "/traefik.zip" -Force

# Runner image
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

COPY --from=installer /traefik.exe /

EXPOSE 80
ENTRYPOINT [ "/traefik" ]

# Metadata
LABEL org.opencontainers.image.vendor="Traefik Labs" \
org.opencontainers.image.url="https://traefik.io" \
org.opencontainers.image.source="https://github.com/traefik/traefik" \
org.opencontainers.image.title="Traefik" \
org.opencontainers.image.description="A modern reverse-proxy" \
org.opencontainers.image.version="v3.0.0-rc5" \
org.opencontainers.image.documentation="https://docs.traefik.io"
26 changes: 26 additions & 0 deletions windows/nanoserver-ltsc2022/tmplv2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Installer image, needed for Invoke-WebRequest
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS installer
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN Invoke-WebRequest \
-Uri "https://github.com/traefik/traefik/releases/download/${VERSION}/traefik_${VERSION}_windows_amd64.zip" \
-OutFile "/traefik.zip"; \
Expand-Archive -Path "/traefik.zip" -DestinationPath "/" -Force; \
Remove-Item "/traefik.zip" -Force

# Runner image
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

COPY --from=installer /traefik.exe /

EXPOSE 80
ENTRYPOINT [ "/traefik" ]

# Metadata
LABEL org.opencontainers.image.vendor="Traefik Labs" \
org.opencontainers.image.url="https://traefik.io" \
org.opencontainers.image.source="https://github.com/traefik/traefik" \
org.opencontainers.image.title="Traefik" \
org.opencontainers.image.description="A modern reverse-proxy" \
org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.documentation="https://docs.traefik.io"
26 changes: 26 additions & 0 deletions windows/nanoserver-ltsc2022/tmplv3.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Installer image, needed for Invoke-WebRequest
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS installer
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN Invoke-WebRequest \
-Uri "https://github.com/traefik/traefik/releases/download/${VERSION}/traefik_${VERSION}_windows_amd64.zip" \
-OutFile "/traefik.zip"; \
Expand-Archive -Path "/traefik.zip" -DestinationPath "/" -Force; \
Remove-Item "/traefik.zip" -Force

# Runner image
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

COPY --from=installer /traefik.exe /

EXPOSE 80
ENTRYPOINT [ "/traefik" ]

# Metadata
LABEL org.opencontainers.image.vendor="Traefik Labs" \
org.opencontainers.image.url="https://traefik.io" \
org.opencontainers.image.source="https://github.com/traefik/traefik" \
org.opencontainers.image.title="Traefik" \
org.opencontainers.image.description="A modern reverse-proxy" \
org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.documentation="https://docs.traefik.io"

0 comments on commit aba0948

Please sign in to comment.