From 1f445a9be0db724402ed1f566a6816cd6938ee92 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Mon, 22 Apr 2024 17:55:36 +0800 Subject: [PATCH] refactor --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6c5ee17e2..fa9cb986a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,15 @@ WORKDIR /openim-server # Set the Go proxy to improve dependency resolution speed ENV GOPROXY=https://goproxy.cn,direct +COPY go.mod go.sum ./ +RUN go mod download # Copy all files from the current directory into the container COPY . . + RUN go install github.com/magefile/mage@latest -RUN mage -v && mage build +RUN mage build # Use Alpine Linux as the final base image due to its small size and included utilities FROM alpine:latest