From c822da85eef6545223040d8396c2ee433e81807a Mon Sep 17 00:00:00 2001 From: xushuhui <474497097@qq.com> Date: Wed, 24 Jul 2024 11:57:23 +0800 Subject: [PATCH] fix: make build fail before download dependencies package when build docker image --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 848a8a1..a61c429 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ FROM golang:1.19 AS builder COPY . /src WORKDIR /src -RUN GOPROXY=https://goproxy.cn make build +ENV GOPROXY https://goproxy.cn +RUN go mod tidy && make build FROM debian:stable-slim