Skip to content

Instantly share code, notes, and snippets.

@vtml
Last active February 14, 2021 22:23
Show Gist options
  • Select an option

  • Save vtml/e735ddcdf88123c349f20d9343d54197 to your computer and use it in GitHub Desktop.

Select an option

Save vtml/e735ddcdf88123c349f20d9343d54197 to your computer and use it in GitHub Desktop.
Traefik 20H2
services:
traefik:
image: traefik:v${TRAEFIK_VERSION}-nanoserver-${NANOSERVER_VERSION}
build:
context: .
args:
NANOSERVER_VERSION: ${NANOSERVER_VERSION}
TRAEFIK_VERSION: '${TRAEFIK_VERSION}'
...
ARG NANOSERVER_VERSION
FROM mcr.microsoft.com/windows/servercore:${NANOSERVER_VERSION} as ServerCore
FROM mcr.microsoft.com/windows/nanoserver:${NANOSERVER_VERSION}
ARG TRAEFIK_VERSION=$TRAEFIK_VERSION
ENV traefik_zip="https://github.com/containous/traefik/releases/download/v${TRAEFIK_VERSION}/traefik_v${TRAEFIK_VERSION}_windows_amd64.zip"
WORKDIR C:/
RUN mkdir downloads
ADD ${traefik_zip} ./downloads/traefik.zip
RUN mkdir traefik
RUN tar -xf ./downloads/traefik.zip -C ./traefik
COPY --from=ServerCore /windows/system32/netapi32.dll /windows/system32/netapi32.dll
ENTRYPOINT ["C:\\traefik\\traefik.exe"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment