dockerfiles/golang-builder/Dockerfile

16 lines
481 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

FROM golang:1.17-alpine
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn
# 修改alpine源为中科大的源安装必要工具
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
apk update && \
apk upgrade && \
apk add --no-cache ca-certificates gcc g++ && update-ca-certificates && \
apk add --no-cache --update tzdata upx && \
rm -rf /var/cache/apk/*
ENV TZ=Asia/Shanghai