diff options
author | CrazyMax <crazy-max@users.noreply.github.com> | 2022-04-12 13:15:54 +0200 |
---|---|---|
committer | CrazyMax <crazy-max@users.noreply.github.com> | 2022-04-14 19:52:36 +0200 |
commit | 1efda78f2bccb7b5654e6d02131ff2b1260b2663 (patch) | |
tree | ba2c909de97d2542bb5a961a9dd08670fb8dc074 /Dockerfile.windows | |
parent | fd2143e0b086931d3b5432f167a795fb4201e440 (diff) | |
download | docker-1efda78f2bccb7b5654e6d02131ff2b1260b2663.tar.gz |
use go-winres for windows build and cleanup autogen and winresources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Diffstat (limited to 'Dockerfile.windows')
-rw-r--r-- | Dockerfile.windows | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Dockerfile.windows b/Dockerfile.windows index 881b111ed7..ff23934cf8 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -168,6 +168,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref ARG GO_VERSION=1.18.0 ARG CONTAINERD_VERSION=1.6.2 ARG GOTESTSUM_VERSION=v1.7.0 +ARG GOWINRES_VERSION=v0.2.3 # Environment variable notes: # - GO_VERSION must be consistent with 'Dockerfile' used by Linux. @@ -179,7 +180,8 @@ ENV GO_VERSION=${GO_VERSION} ` GOPATH=C:\gopath ` GO111MODULE=off ` FROM_DOCKERFILE=1 ` - GOTESTSUM_VERSION=${GOTESTSUM_VERSION} + GOTESTSUM_VERSION=${GOTESTSUM_VERSION} ` + GOWINRES_VERSION=${GOWINRES_VERSION} RUN ` Function Test-Nano() { ` @@ -289,6 +291,22 @@ RUN ` ` Install-GoTestSum +RUN ` + Function Install-GoWinres() { ` + $Env:GO111MODULE = 'on'; ` + $tmpGobin = "${Env:GOBIN_TMP}"; ` + $Env:GOBIN = """${Env:GOPATH}`\bin"""; ` + Write-Host "INFO: Installing go-winres version $Env:GOWINRES_VERSION in $Env:GOBIN"; ` + &go install "github.com/tc-hib/go-winres@${Env:GOWINRES_VERSION}"; ` + $Env:GOBIN = "${tmpGobin}"; ` + $Env:GO111MODULE = 'off'; ` + if ($LASTEXITCODE -ne 0) { ` + Throw '"go-winres install failed..."'; ` + } ` + } ` + ` + Install-GoWinres + # Make PowerShell the default entrypoint ENTRYPOINT ["powershell.exe"] |