Dockerfile 添加镜像地址
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
# 第一阶段:构建
|
# 第一阶段:构建
|
||||||
FROM golang:1.24.0 AS builder
|
FROM golang:1.24.0 AS builder
|
||||||
|
|
||||||
|
ENV GOPROXY=https://goproxy.cn,direct
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
# 复制Go模块文件
|
# 复制Go模块文件
|
||||||
@@ -18,12 +20,6 @@ FROM ubuntu:24.04
|
|||||||
|
|
||||||
WORKDIR /app
|
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
|
COPY --from=builder /build/bin/platform_linux_amd64 /app/platform
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user