Skip to content

Commit

Permalink
Revert "Use smaller windows base image (#12)" (#13)
Browse files Browse the repository at this point in the history
This reverts commit dc3a21d.
  • Loading branch information
shubham149 authored Feb 28, 2022
1 parent dc3a21d commit f6266e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
11 changes: 1 addition & 10 deletions docker/Dockerfile.windows.amd64.1809
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
# escape=`

FROM mcr.microsoft.com/windows/servercore:1809 as base
FROM mcr.microsoft.com/windows/servercore:1809
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
USER ContainerAdministrator

ENV GODEBUG=netdns=go
RUN mkdir /bin
RUN Invoke-WebRequest https://releases.jfrog.io/artifactory/jfrog-cli/v2/2.10.0/jfrog-cli-windows-amd64/jfrog.exe -OutFile C:/bin/jfrog.exe

FROM mcr.microsoft.com/powershell:nanoserver-1809
COPY --from=base /bin /bin

ADD release/windows/amd64/plugin C:/bin/drone-artifactory.exe

# 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';"]
ENTRYPOINT [ "C:\\bin\\drone-artifactory.exe" ]
12 changes: 1 addition & 11 deletions docker/Dockerfile.windows.amd64.1909
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
# escape=`

FROM mcr.microsoft.com/windows/servercore:1909 as base
FROM mcr.microsoft.com/windows/servercore:1909
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
USER ContainerAdministrator

ENV GODEBUG=netdns=go
RUN mkdir /bin
RUN Invoke-WebRequest https://releases.jfrog.io/artifactory/jfrog-cli/v2/2.10.0/jfrog-cli-windows-amd64/jfrog.exe -OutFile C:/bin/jfrog.exe

FROM mcr.microsoft.com/powershell:nanoserver-1909
COPY --from=base /bin /bin

ADD release/windows/amd64/plugin C:/bin/drone-artifactory.exe

# 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';"]
ENTRYPOINT [ "C:\\bin\\drone-artifactory.exe" ]
2 changes: 1 addition & 1 deletion plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func Exec(ctx context.Context, args Args) error {

func getShell() (string, string) {
if runtime.GOOS == "windows" {
return "pwsh", "-Command"
return "powershell", "-Command"
}

return "sh", "-c"
Expand Down

0 comments on commit f6266e2

Please sign in to comment.