Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
twbworld committed Jan 8, 2024
1 parent 04d9d5d commit f56dc08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ ENV CGO_ENABLED=1
COPY go.mod go.sum ./
#安装编译需要的环境gcc等, 同时CGO_ENABLED=1
RUN apk --update upgrade \
&& apk add --no-cache sqlite gcc g++ \
&& apk add --no-cache build-base sqlite gcc g++ libc-dev libsqlite3-dev \
&& go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH CC=gcc go build -ldflags="-s -w" -o server . && \
RUN CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH go build -ldflags="-s -w" -o server . && \
mv config/.env.example config/clash.ini server /app/static

##打包镜像
Expand Down

0 comments on commit f56dc08

Please sign in to comment.