2017-08-22 16:22:12 -06:00
|
|
|
# Template for Dockerfile, used in build.docker script.
|
2020-02-05 13:06:27 -07:00
|
|
|
# Based on https://github.com/docker-library/golang/blob/7e3d99a803/1.13/buster/Dockerfile
|
|
|
|
FROM buildpack-deps:buster-scm
|
2017-08-22 16:22:12 -06:00
|
|
|
|
|
|
|
# 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/*
|
|
|
|
|
2020-02-05 13:06:27 -07:00
|
|
|
ENV GOLANG_VERSION VVV
|
2017-08-22 16:22:12 -06:00
|
|
|
|
|
|
|
RUN set -eux; \
|
|
|
|
\
|
2020-02-05 13:06:27 -07:00
|
|
|
url="UUU"; \
|
|
|
|
wget -O go.tgz "$url"; \
|
|
|
|
echo "SSS go.tgz" | sha256sum -c -; \
|
|
|
|
tar -C /usr/local -xzf go.tgz; \
|
|
|
|
rm go.tgz; \
|
|
|
|
\
|
2017-08-22 16:22:12 -06:00
|
|
|
export PATH="/usr/local/go/bin:$PATH"; \
|
|
|
|
go version
|
|
|
|
|
|
|
|
ENV GOPATH /go
|
|
|
|
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
2020-02-05 13:06:27 -07:00
|
|
|
|
2017-08-22 16:22:12 -06:00
|
|
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
|
|
|
WORKDIR $GOPATH
|