diff --git a/.drone.yml b/.drone.yml index 23095f9..52df889 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,7 +21,7 @@ steps: auto_tag_suffix: linux-amd64 dockerfile: docker/Dockerfile.linux.amd64 password: - $secret: password + from_secret: docker_password repo: drone/git username: drone when: @@ -52,7 +52,7 @@ steps: auto_tag_suffix: linux-arm64 dockerfile: docker/Dockerfile.linux.arm64 password: - $secret: password + from_secret: docker_password repo: drone/git username: drone when: @@ -83,7 +83,7 @@ steps: auto_tag_suffix: linux-arm dockerfile: docker/Dockerfile.linux.arm password: - $secret: password + from_secret: docker_password repo: drone/git username: drone when: @@ -105,7 +105,7 @@ steps: settings: ignore_missing: true password: - $secret: password + from_secret: docker_password spec: docker/manifest.tmpl username: drone when: @@ -119,11 +119,4 @@ depends_on: - linux-arm64 - linux-amd64 ---- -kind: secret -type: external -data: - password: "drone/docker#password" - username: "drone/docker#username" - ... diff --git a/docker/Dockerfile.windows.1903 b/docker/Dockerfile.windows.1903 new file mode 100644 index 0000000..71982da --- /dev/null +++ b/docker/Dockerfile.windows.1903 @@ -0,0 +1,20 @@ +# escape=` + +FROM mcr.microsoft.com/windows/servercore:1903 AS git +SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` + Invoke-WebRequest -UseBasicParsing https://github.com/git-for-windows/git/releases/download/v2.21.0.windows.1/MinGit-2.21.0-64-bit.zip -OutFile git.zip; ` + Expand-Archive git.zip -DestinationPath C:\git; + +FROM mcr.microsoft.com/powershell:nanoserver-1903 +COPY --from=git /git /git + +ADD windows/* /bin/ + +# https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137 +USER ContainerAdministrator +RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell" + +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +CMD [ "pwsh", "C:\\bin\\clone.ps1" ]