Update Go Dependency to 1.19.5
Also move to using fixed binary builds instead of building from source.
This commit is contained in:
parent
6280a51b6e
commit
0efd4ae9a6
27
Dockerfile
27
Dockerfile
|
@ -36,8 +36,8 @@ RUN ln -sf $ANDROID_HOME/ndk/$NDK_VER $ANDROID_HOME/ndk-bundle
|
||||||
## - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
|
## - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
|
||||||
RUN echo 'hosts: files dns' > /etc/nsswitch.conf
|
RUN echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||||
|
|
||||||
ENV GOLANG_VERSION=1.19.3
|
ENV GOLANG_VERSION=1.19.5.linux-amd64
|
||||||
ENV GOLANG_SHA256=18ac263e39210bcf68d85f4370e97fb1734166995a1f63fb38b4f6e07d90d212
|
ENV GOLANG_SHA256=36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
@ -49,32 +49,11 @@ RUN set -eux; \
|
||||||
golang \
|
golang \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
export \
|
wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.tar.gz"; \
|
||||||
## set GOROOT_BOOTSTRAP such that we can actually build Go
|
|
||||||
GOROOT_BOOTSTRAP="$(go env GOROOT)" \
|
|
||||||
## ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch
|
|
||||||
## (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386)
|
|
||||||
GOOS="$(go env GOOS)" \
|
|
||||||
GOARCH="$(go env GOARCH)" \
|
|
||||||
GOHOSTOS="$(go env GOHOSTOS)" \
|
|
||||||
GOHOSTARCH="$(go env GOHOSTARCH)" \
|
|
||||||
; \
|
|
||||||
## also explicitly set GO386 and GOARM if appropriate
|
|
||||||
## https://github.com/docker-library/golang/issues/184
|
|
||||||
aptArch="$(dpkg-architecture -q DEB_BUILD_GNU_CPU)"; \
|
|
||||||
case "$aptArch" in \
|
|
||||||
arm) export GOARM='6' ;; \
|
|
||||||
x86_64) export GO386='387' ;; \
|
|
||||||
esac; \
|
|
||||||
\
|
|
||||||
wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
|
|
||||||
echo "$GOLANG_SHA256 *go.tgz" | sha256sum -c -; \
|
echo "$GOLANG_SHA256 *go.tgz" | sha256sum -c -; \
|
||||||
tar -C /usr/local -xzf go.tgz; \
|
tar -C /usr/local -xzf go.tgz; \
|
||||||
rm go.tgz; \
|
rm go.tgz; \
|
||||||
\
|
\
|
||||||
cd /usr/local/go/src; \
|
|
||||||
./make.bash; \
|
|
||||||
\
|
|
||||||
export PATH="/usr/local/go/bin:$PATH"; \
|
export PATH="/usr/local/go/bin:$PATH"; \
|
||||||
go version
|
go version
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue