Builder 的 Dockerfiler 如下:
FROM alpine:3.19
# 定义Go版本和下载链接
ENV GO_VERSION=1.21.5
ENV GO_DOWNLOAD_URL=https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
# 下载并安装Go
RUN set -ex \
&& apk add --no-cache build-base \
&& wget -O go.tar.gz ${GO_DOWNLOAD_URL} \
&& tar -xzf go.tar.gz \
&& mv go /usr/local/ \
&& rm -f go.tar.gz
# 设置Go环境变量
ENV GOROOT=/usr/local/go
ENV PATH=$GOROOT/bin:${PATH}
Dockerfile
Content type
Image
Digest
sha256:e92e78763…
Size
124.5 MB
Last updated
over 2 years ago
docker pull shine09/lang-id:server-1.0.0