mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #22082 from tiborvass/revert-go-security-fix-for-windows
Workaround Windows bug discovered with Go security fix
This commit is contained in:
commit
1cd7dd8917
2 changed files with 16 additions and 0 deletions
10
Dockerfile
10
Dockerfile
|
@ -129,6 +129,16 @@ RUN set -x \
|
|||
ENV GO_VERSION 1.5.4
|
||||
RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \
|
||||
| tar -xzC /usr/local
|
||||
|
||||
# !!! TEMPORARY HACK !!!
|
||||
# Because of https://github.com/golang/go/issues/15286 we have to revert to Go 1.5.3 for windows/amd64 in master
|
||||
# To change which version of Go to compile with, simply prepend PATH with /usr/local/go1.5.3/bin
|
||||
# and set GOROOT to /usr/local/go1.5.3
|
||||
ENV HACK_GO_VERSION 1.5.3
|
||||
RUN curl -fsSL "https://storage.googleapis.com/golang/go${HACK_GO_VERSION}.linux-amd64.tar.gz" \
|
||||
| tar -xzC /tmp \
|
||||
&& mv /tmp/go "/usr/local/go${HACK_GO_VERSION}"
|
||||
|
||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
|
||||
|
||||
|
|
|
@ -29,6 +29,12 @@ for platform in $DOCKER_CROSSPLATFORMS; do
|
|||
export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms
|
||||
export BUILDFLAGS=( "${ORIG_BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported
|
||||
fi
|
||||
# !!! TEMPORARY HACK !!!
|
||||
# See Dockerfile
|
||||
if [ "$platform" == "windows/amd64" ]; then
|
||||
export GOROOT="/usr/local/go${HACK_GO_VERSION}"
|
||||
export PATH=$(echo "$PATH" | sed "s,:/usr/local/go/bin:,:/usr/local/go${HACK_GO_VERSION}/bin:,")
|
||||
fi
|
||||
source "${MAKEDIR}/binary"
|
||||
)
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue