From ec2669aa2d5c97b20a3d925bbc9af16303431122 Mon Sep 17 00:00:00 2001 From: TP Honey Date: Fri, 16 Dec 2022 13:24:19 +0000 Subject: [PATCH] (maint) fix windows docker files --- docker/Dockerfile.windows.1809 | 14 +++++++++----- docker/Dockerfile.windows.ltsc2022 | 16 ++++++++++------ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/docker/Dockerfile.windows.1809 b/docker/Dockerfile.windows.1809 index b362d36..e7ca530 100644 --- a/docker/Dockerfile.windows.1809 +++ b/docker/Dockerfile.windows.1809 @@ -1,4 +1,12 @@ # escape=` +FROM mcr.microsoft.com/windows/servercore:1809 as download + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +RUN mkdir C:\app +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` + Invoke-WebRequest 'https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-windows-amd64.exe' -OutFile 'c:\app\manifest-tool.exe' + FROM plugins/base:windows-1809-amd64 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -8,11 +16,7 @@ LABEL maintainer="Drone.IO Community " ` org.label-schema.vendor="Drone.IO Community" ` org.label-schema.schema-version="1.0" -ENV MANIFEST_TOOL_VERSION 1.0.2 - -RUN New-Item -ItemType directory -Path 'C:/bin'; ` - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` - Invoke-WebRequest ('https://github.com/estesp/manifest-tool/releases/download/v{0}/manifest-tool-windows-amd64.exe' -f $env:MANIFEST_TOOL_VERSION) -OutFile 'C:/bin/manifest-tool.exe'; +COPY --from=download /app/manifest-tool.exe C:/bin/docker.exe ADD release/windows/amd64/drone-manifest.exe C:/bin/drone-manifest.exe ENTRYPOINT [ "C:\\bin\\drone-manifest.exe" ] diff --git a/docker/Dockerfile.windows.ltsc2022 b/docker/Dockerfile.windows.ltsc2022 index 96eb606..ba0930a 100644 --- a/docker/Dockerfile.windows.ltsc2022 +++ b/docker/Dockerfile.windows.ltsc2022 @@ -1,4 +1,12 @@ # escape=` +FROM mcr.microsoft.com/windows/servercore:ltsc2022 as download + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +RUN mkdir C:\app +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` + Invoke-WebRequest 'https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-windows-amd64.exe' -OutFile 'c:\app\manifest-tool.exe' + FROM plugins/base:windows-ltsc2022-amd64@sha256:0f90d5bceb432f1ee6f93cf44eed6a38c322834edd55df8a6648c9e6f15131f4 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -8,11 +16,7 @@ LABEL maintainer="Drone.IO Community " ` org.label-schema.vendor="Drone.IO Community" ` org.label-schema.schema-version="1.0" -ENV MANIFEST_TOOL_VERSION 1.0.2 - -RUN New-Item -ItemType directory -Path 'C:/bin'; ` - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` - Invoke-WebRequest ('https://github.com/estesp/manifest-tool/releases/download/v{0}/manifest-tool-windows-amd64.exe' -f $env:MANIFEST_TOOL_VERSION) -OutFile 'C:/bin/manifest-tool.exe'; +COPY --from=download /app/manifest-tool.exe C:/bin/docker.exe ADD release/windows/amd64/drone-manifest.exe C:/bin/drone-manifest.exe -ENTRYPOINT [ "C:\\bin\\drone-manifest.exe" ] +ENTRYPOINT [ "C:\\bin\\drone-manifest.exe" ] \ No newline at end of file