Dockerfile 添加镜像地址

This commit is contained in:
2025-04-19 18:15:46 +08:00
parent f51808564c
commit 91ef0b0ac5
2 changed files with 2 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
# 第一阶段:构建
FROM golang:1.24.0 AS builder
ENV GOPROXY=https://goproxy.cn,direct
WORKDIR /build
# 复制Go模块文件
@@ -18,12 +20,6 @@ FROM ubuntu:24.04
WORKDIR /app
# 安装依赖包
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# 从构建阶段复制编译好的二进制文件
COPY --from=builder /build/bin/platform_linux_amd64 /app/platform