1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08:00
go-cqhttp/Dockerfile
2020-11-29 18:21:01 +08:00

23 lines
427 B
Docker

FROM golang:1.15.5-alpine AS builder
RUN go env -w GO111MODULE=auto \
&& go env -w CGO_ENABLED=0 \
&& go env -w GOPROXY=https://goproxy.cn,direct
WORKDIR /build
COPY ./ .
RUN set -ex \
&& cd /build \
&& go build -ldflags "-s -w -extldflags '-static'" -o cqhttp
FROM alpine:latest
COPY --from=builder /build/cqhttp /usr/bin/cqhttp
RUN chmod +x /usr/bin/cqhttp
WORKDIR /data
ENTRYPOINT [ "/usr/bin/cqhttp" ]