diff --git a/Dockerfile b/Dockerfile index 7c32747402..1f5bb2d752 100644 --- a/Dockerfile +++ b/Dockerfile @@ -234,10 +234,11 @@ RUN set -x \ && rm -rf "$GOPATH" # Build/install the tool for embedding resources in Windows binaries -ENV RSRC_VERSION v2 +ENV RSRC_COMMIT ba14da1f827188454a4591717fff29999010887f RUN set -x \ && export GOPATH="$(mktemp -d)" \ - && git clone --depth 1 -b "$RSRC_VERSION" https://github.com/akavel/rsrc.git "$GOPATH/src/github.com/akavel/rsrc" \ + && git clone https://github.com/akavel/rsrc.git "$GOPATH/src/github.com/akavel/rsrc" \ + && (cd "$GOPATH/src/github.com/akavel/rsrc" && git checkout -q "$RSRC_COMMIT") \ && go build -v -o /usr/local/bin/rsrc github.com/akavel/rsrc \ && rm -rf "$GOPATH" diff --git a/hack/make/.go-autogen b/hack/make/.go-autogen index bc4f939549..71f8370b5c 100644 --- a/hack/make/.go-autogen +++ b/hack/make/.go-autogen @@ -55,5 +55,12 @@ if [ "$(go env GOOS)" = 'windows' ]; then rsrc \ -manifest hack/make/.resources-windows/docker.exe.manifest \ -ico hack/make/.resources-windows/docker.ico \ - -o autogen/winresources/rsrc.syso > /dev/null + -arch "amd64" \ + -o autogen/winresources/rsrc_amd64.syso > /dev/null + + rsrc \ + -manifest hack/make/.resources-windows/docker.exe.manifest \ + -ico hack/make/.resources-windows/docker.ico \ + -arch "386" \ + -o autogen/winresources/rsrc_386.syso > /dev/null fi diff --git a/hack/make/binary b/hack/make/binary index 584ab8509a..0c6058a5ef 100644 --- a/hack/make/binary +++ b/hack/make/binary @@ -14,17 +14,10 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC windows/amd64) export CC=x86_64-w64-mingw32-gcc export CGO_ENABLED=1 - export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode internal -extld=${CC}" ;; esac fi -if [ "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" == "windows/amd64" ] && [ "$(go env GOOS)" == "windows" ]; then - # native compilation of Windows on Windows with golang 1.5+ needs linkmode internal - # https://github.com/golang/go/issues/13070 - export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode=internal" -fi - if [ "$(go env GOOS)" == "linux" ] ; then case "$(go env GOARCH)" in arm*|386)