2023-07-06 21:05:25 +08:00
|
|
|
# 基础镜像
|
2023-11-08 11:36:38 +08:00
|
|
|
FROM golang:1.21.4-bookworm
|
2023-07-06 21:05:25 +08:00
|
|
|
|
|
|
|
# 作者信息
|
|
|
|
LABEL MAINTAINER="xiaoqidun@gmail.com"
|
|
|
|
|
2023-09-29 15:35:25 +08:00
|
|
|
# 使用中国软件源
|
|
|
|
RUN sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources
|
|
|
|
|
2023-07-06 21:05:25 +08:00
|
|
|
# 安装编译工具链
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y \
|
|
|
|
build-essential mingw-w64 \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# 安装android ndk
|
2023-11-08 11:36:38 +08:00
|
|
|
COPY android-ndk-r26b /usr/local/android-ndk-r26b
|
2023-07-06 21:05:25 +08:00
|
|
|
|
|
|
|
# 环境变量
|
2023-11-08 11:36:38 +08:00
|
|
|
ENV PATH=$PATH:/usr/local/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin
|
2023-07-06 21:05:25 +08:00
|
|
|
ENV GO111MODULE=on
|
2023-07-07 00:55:27 +08:00
|
|
|
ENV GOPROXY=https://goproxy.cn,direct
|