- FROM ubuntu:24.04
- # 设置环境变量
- ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
- # 安装 Go 和其他必要的工具
- RUN apt-get update && \
- apt-get install -y \
- wget \
- git \
- build-essential && \
- wget https://golang.org/dl/go1.20.linux-amd64.tar.gz && \
- tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz && \
- rm go1.20.linux-amd64.tar.gz && \
- echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile && \
- /bin/bash -c "source /etc/profile"
|