From 9670ec8270c3bd12fb58a10009625fce3b0104fc Mon Sep 17 00:00:00 2001 From: coward Date: Wed, 8 May 2024 14:33:40 +0800 Subject: [PATCH] =?UTF-8?q?:whale:dockerfile=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cd04ad5..e9656f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM golang:alpine as build +RUN apk add upx + WORKDIR /build COPY . . @@ -7,7 +9,7 @@ COPY . . ENV GO111MODULE=on ENV GOPROXY=https://goproxy.cn,direct -RUN go mod download && go build -o app +RUN go mod download && go build -o app && upx -9 app RUN ls -lh && chmod +x ./app