From 1f97d4217a74f1e3f083d38944da230b1a6c8749 Mon Sep 17 00:00:00 2001 From: Don Date: Thu, 24 Jan 2019 18:48:22 -0800 Subject: [PATCH 1/2] Add Windows Dockerfiles --- docker/docker/Dockerfile.windows.1803 | 25 +++++++++++++++++++++++++ docker/docker/Dockerfile.windows.1809 | 25 +++++++++++++++++++++++++ docker/docker/manifest.tmpl | 12 ++++++++++++ docker/ecr/Dockerfile.windows.1803 | 10 ++++++++++ docker/ecr/Dockerfile.windows.1809 | 10 ++++++++++ docker/ecr/manifest.tmpl | 12 ++++++++++++ docker/gcr/Dockerfile.windows.1803 | 10 ++++++++++ docker/gcr/Dockerfile.windows.1809 | 10 ++++++++++ docker/gcr/manifest.tmpl | 12 ++++++++++++ 9 files changed, 126 insertions(+) create mode 100644 docker/docker/Dockerfile.windows.1803 create mode 100644 docker/docker/Dockerfile.windows.1809 create mode 100644 docker/ecr/Dockerfile.windows.1803 create mode 100644 docker/ecr/Dockerfile.windows.1809 create mode 100644 docker/gcr/Dockerfile.windows.1803 create mode 100644 docker/gcr/Dockerfile.windows.1809 diff --git a/docker/docker/Dockerfile.windows.1803 b/docker/docker/Dockerfile.windows.1803 new file mode 100644 index 0000000..a7dcb72 --- /dev/null +++ b/docker/docker/Dockerfile.windows.1803 @@ -0,0 +1,25 @@ +# escape=` +FROM mcr.microsoft.com/windows/servercore:1803 as download + +LABEL maintainer="Drone.IO Community " ` + 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" ] diff --git a/docker/docker/Dockerfile.windows.1809 b/docker/docker/Dockerfile.windows.1809 new file mode 100644 index 0000000..68be3a4 --- /dev/null +++ b/docker/docker/Dockerfile.windows.1809 @@ -0,0 +1,25 @@ +# escape=` +FROM mcr.microsoft.com/windows/servercore:1809 as download + +LABEL maintainer="Drone.IO Community " ` + 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" ] diff --git a/docker/docker/manifest.tmpl b/docker/docker/manifest.tmpl index 5b399aa..d03db6c 100644 --- a/docker/docker/manifest.tmpl +++ b/docker/docker/manifest.tmpl @@ -23,3 +23,15 @@ manifests: architecture: arm os: linux 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 diff --git a/docker/ecr/Dockerfile.windows.1803 b/docker/ecr/Dockerfile.windows.1803 new file mode 100644 index 0000000..dfbd497 --- /dev/null +++ b/docker/ecr/Dockerfile.windows.1803 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1803 + +LABEL maintainer="Drone.IO Community " ` + 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" ] diff --git a/docker/ecr/Dockerfile.windows.1809 b/docker/ecr/Dockerfile.windows.1809 new file mode 100644 index 0000000..673ea8c --- /dev/null +++ b/docker/ecr/Dockerfile.windows.1809 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1809 + +LABEL maintainer="Drone.IO Community " ` + 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" ] diff --git a/docker/ecr/manifest.tmpl b/docker/ecr/manifest.tmpl index 424295f..74654eb 100644 --- a/docker/ecr/manifest.tmpl +++ b/docker/ecr/manifest.tmpl @@ -23,3 +23,15 @@ manifests: architecture: arm os: linux 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 diff --git a/docker/gcr/Dockerfile.windows.1803 b/docker/gcr/Dockerfile.windows.1803 new file mode 100644 index 0000000..31ebc76 --- /dev/null +++ b/docker/gcr/Dockerfile.windows.1803 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1803 + +LABEL maintainer="Drone.IO Community " ` + 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" ] diff --git a/docker/gcr/Dockerfile.windows.1809 b/docker/gcr/Dockerfile.windows.1809 new file mode 100644 index 0000000..17e8dc0 --- /dev/null +++ b/docker/gcr/Dockerfile.windows.1809 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1809 + +LABEL maintainer="Drone.IO Community " ` + 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" ] diff --git a/docker/gcr/manifest.tmpl b/docker/gcr/manifest.tmpl index 82f8dae..35c56fa 100644 --- a/docker/gcr/manifest.tmpl +++ b/docker/gcr/manifest.tmpl @@ -23,3 +23,15 @@ manifests: architecture: arm os: linux 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 From f4bb382f5d473aceee8c3046bbd8d8e4c609ea67 Mon Sep 17 00:00:00 2001 From: Don Date: Fri, 25 Jan 2019 09:24:55 -0800 Subject: [PATCH 2/2] Use drive letters consistently --- docker/docker/Dockerfile.windows.1803 | 2 +- docker/docker/Dockerfile.windows.1809 | 2 +- docker/ecr/Dockerfile.windows.1803 | 2 +- docker/ecr/Dockerfile.windows.1809 | 2 +- docker/gcr/Dockerfile.windows.1803 | 2 +- docker/gcr/Dockerfile.windows.1809 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/docker/Dockerfile.windows.1803 b/docker/docker/Dockerfile.windows.1803 index a7dcb72..67e18fd 100644 --- a/docker/docker/Dockerfile.windows.1803 +++ b/docker/docker/Dockerfile.windows.1803 @@ -21,5 +21,5 @@ 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 +ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ] diff --git a/docker/docker/Dockerfile.windows.1809 b/docker/docker/Dockerfile.windows.1809 index 68be3a4..df5caf9 100644 --- a/docker/docker/Dockerfile.windows.1809 +++ b/docker/docker/Dockerfile.windows.1809 @@ -21,5 +21,5 @@ 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 +ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ] diff --git a/docker/ecr/Dockerfile.windows.1803 b/docker/ecr/Dockerfile.windows.1803 index dfbd497..367cfb2 100644 --- a/docker/ecr/Dockerfile.windows.1803 +++ b/docker/ecr/Dockerfile.windows.1803 @@ -6,5 +6,5 @@ LABEL maintainer="Drone.IO Community " ` 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 +ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ] diff --git a/docker/ecr/Dockerfile.windows.1809 b/docker/ecr/Dockerfile.windows.1809 index 673ea8c..4d12228 100644 --- a/docker/ecr/Dockerfile.windows.1809 +++ b/docker/ecr/Dockerfile.windows.1809 @@ -6,5 +6,5 @@ LABEL maintainer="Drone.IO Community " ` 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 +ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ] diff --git a/docker/gcr/Dockerfile.windows.1803 b/docker/gcr/Dockerfile.windows.1803 index 31ebc76..76bac6f 100644 --- a/docker/gcr/Dockerfile.windows.1803 +++ b/docker/gcr/Dockerfile.windows.1803 @@ -6,5 +6,5 @@ LABEL maintainer="Drone.IO Community " ` 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 +ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ] diff --git a/docker/gcr/Dockerfile.windows.1809 b/docker/gcr/Dockerfile.windows.1809 index 17e8dc0..1b1134b 100644 --- a/docker/gcr/Dockerfile.windows.1809 +++ b/docker/gcr/Dockerfile.windows.1809 @@ -6,5 +6,5 @@ LABEL maintainer="Drone.IO Community " ` 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 +ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ]