wp-go/Dockerfile
2024-01-24 15:25:12 +08:00

10 lines
289 B
Docker

FROM golang:1.21.6-alpine as gobulidIso
COPY ./ /go/src/wp-go
WORKDIR /go/src/wp-go
#ENV GOPROXY="https://goproxy.cn"
RUN go build -ldflags "-w" -tags netgo -o wp-go app/cmd/main.go
FROM alpine:latest
WORKDIR /opt/wp-go
COPY --from=gobulidIso /go/src/wp-go/wp-go ./
ENTRYPOINT ["./wp-go"]