feat: publish docker image in ci

This commit is contained in:
Shengjing Zhu
2022-03-08 12:22:51 +08:00
parent ad658fd99d
commit f77617f529
3 changed files with 85 additions and 0 deletions

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM --platform=$BUILDPLATFORM golang as builder
WORKDIR /app
COPY . .
RUN go mod vendor
ARG TARGETARCH
RUN CGO_ENABLED=0 GOARCH=$TARGETARCH go build -v -trimpath -ldflags="-w -s" .
FROM scratch
COPY --from=builder /app/wghttp /
ENTRYPOINT ["/wghttp"]