Skip to content

Commit

Permalink
chore: remove upx when build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
1379 authored and 1379 committed Jan 28, 2023
1 parent 2fa34f7 commit 27d733b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
FROM golang:1.19.3-alpine as builder

RUN apk --no-cache add git ca-certificates gcc g++ upx
RUN apk --no-cache add git ca-certificates gcc g++

WORKDIR /go/src/github.com/go-sonic/

RUN git clone --recursive --depth 1 https://github.com/go-sonic/sonic.git

WORKDIR /go/src/github.com/go-sonic/sonic

RUN GOPROXY=https://goproxy.cn CGO_ENABLED=1 GOOS=linux go build -o sonic -ldflags="-s -w" -trimpath . && \
upx sonic -o upx_sonic && \
mv -f upx_sonic sonic
RUN GOPROXY=https://goproxy.cn CGO_ENABLED=1 GOOS=linux go build -o sonic -ldflags="-s -w" -trimpath .

RUN mkdir -p /app/conf && \
mkdir /app/resources && \
Expand Down

0 comments on commit 27d733b

Please sign in to comment.