Add Windows Dockerfiles

This commit is contained in:
Don 2019-01-24 18:48:22 -08:00
parent c02aa47d64
commit 1f97d4217a
9 changed files with 126 additions and 0 deletions

@ -0,0 +1,25 @@
# escape=`
FROM mcr.microsoft.com/windows/servercore:1803 as download
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone Docker" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV DOCKER_VERSION 18.09.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.6-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe
FROM plugins/base:windows-1803
COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll
COPY --from=download /app/docker.exe C:/bin/docker.exe
ADD release/windows/amd64/drone-docker.exe c:/bin/drone-docker.exe
ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ]

@ -0,0 +1,25 @@
# escape=`
FROM mcr.microsoft.com/windows/servercore:1809 as download
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone Docker" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV DOCKER_VERSION 18.09.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.6-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe
FROM plugins/base:windows-1809
COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll
COPY --from=download /app/docker.exe C:/bin/docker.exe
ADD release/windows/amd64/drone-docker.exe c:/bin/drone-docker.exe
ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ]

@ -23,3 +23,15 @@ manifests:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
-
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803
platform:
architecture: amd64
os: windows
version: 1803
-
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809
platform:
architecture: amd64
os: windows
version: 1809

@ -0,0 +1,10 @@
# escape=`
FROM plugins/docker:windows-1803
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ECR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-ecr.exe c:/bin/drone-ecr.exe
ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ]

@ -0,0 +1,10 @@
# escape=`
FROM plugins/docker:windows-1809
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone ECR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-ecr.exe c:/bin/drone-ecr.exe
ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ]

@ -23,3 +23,15 @@ manifests:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
-
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803
platform:
architecture: amd64
os: windows
version: 1803
-
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809
platform:
architecture: amd64
os: windows
version: 1809

@ -0,0 +1,10 @@
# escape=`
FROM plugins/docker:windows-1803
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone GCR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-gcr.exe c:/bin/drone-gcr.exe
ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ]

@ -0,0 +1,10 @@
# escape=`
FROM plugins/docker:windows-1809
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone GCR" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-gcr.exe c:/bin/drone-gcr.exe
ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ]

@ -23,3 +23,15 @@ manifests:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
-
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803
platform:
architecture: amd64
os: windows
version: 1803
-
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809
platform:
architecture: amd64
os: windows
version: 1809