wp-go/Dockerfile

10 lines
286 B
Docker
Raw Normal View History

2022-12-07 05:26:52 +00:00
FROM golang:latest as gobulidIso
2022-11-05 09:00:20 +00:00
COPY ./ /go/src/wp-go
WORKDIR /go/src/wp-go
2022-12-07 05:26:52 +00:00
ENV GOPROXY="https://goproxy.cn"
2023-01-13 08:07:28 +00:00
RUN go build -ldflags "-w" -tags netgo -o wp-go internal/cmd/main.go
2022-11-05 09:00:20 +00:00
FROM alpine:latest
WORKDIR /opt/wp-go
2022-12-07 05:26:52 +00:00
COPY --from=gobulidIso /go/src/wp-go/wp-go ./
2022-11-05 09:00:20 +00:00
ENTRYPOINT ["./wp-go"]