From ebf862c8d95e01bdcaaea25ac932e82c44bb2cf8 Mon Sep 17 00:00:00 2001 From: wuchao <1272174216@qq.com> Date: Thu, 27 Jun 2024 15:29:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E5=8C=BA=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c5f9f5a..496b25e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,11 @@ #RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server main.go # 创建最终镜像,用于运行编译后的Go程序 -FROM golang:1.21.0 as host +FROM golang:1.21.0 #设置时区 # 复制宿主机的时区文件到容器内 -COPY --from=host /etc/timezone /etc/timezone -COPY --from=host /etc/localtime /etc/localtime +COPY /etc/timezone /etc/timezone +COPY /etc/localtime /etc/localtime WORKDIR /app # 将编译好的二进制文件从构建阶段复制到运行阶段