mirror of
https://github.com/golang/go
synced 2024-11-26 21:01:31 -07:00
2f9b2e75c4
Fixes #37032 Change-Id: I5f097b4be1995ece8e40ad4b60456c5dbbf4e4d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/217939 Reviewed-by: Katie Hockman <katie@golang.org>
32 lines
719 B
Plaintext
32 lines
719 B
Plaintext
# Template for Dockerfile, used in build.docker script.
|
|
# Based on https://github.com/docker-library/golang/blob/7e3d99a803/1.13/buster/Dockerfile
|
|
FROM buildpack-deps:buster-scm
|
|
|
|
# gcc for cgo
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
g++ \
|
|
gcc \
|
|
libc6-dev \
|
|
make \
|
|
pkg-config \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV GOLANG_VERSION VVV
|
|
|
|
RUN set -eux; \
|
|
\
|
|
url="UUU"; \
|
|
wget -O go.tgz "$url"; \
|
|
echo "SSS go.tgz" | sha256sum -c -; \
|
|
tar -C /usr/local -xzf go.tgz; \
|
|
rm go.tgz; \
|
|
\
|
|
export PATH="/usr/local/go/bin:$PATH"; \
|
|
go version
|
|
|
|
ENV GOPATH /go
|
|
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
|
|
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
|
WORKDIR $GOPATH
|