Skip to content

Commit cda92cc

Browse files
committed
添加二进制压缩
1 parent 5d12d7a commit cda92cc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM golang:alpine AS builder
55
WORKDIR /go/src/github.com/qist/livetv/
66
ARG TARGETARCH
77
# 安装构建依赖
8-
RUN apk add --no-cache build-base git
8+
RUN apk add --no-cache build-base git upx
99
COPY . .
1010

1111
# Go 环境配置
@@ -14,7 +14,8 @@ ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
1414
RUN gcc -v
1515
# 编译 livetv
1616
RUN go build -ldflags "-w -s" -o livetv .
17-
17+
# 压缩文件
18+
RUN upx -9 -k livetv
1819
# ==========================
1920
# Runtime 阶段
2021
# ==========================

0 commit comments

Comments
 (0)