1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00
go-cqhttp/Dockerfile
2022-08-29 18:31:56 +08:00

25 lines
456 B
Docker

FROM golang:1.19-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
RUN apk add --no-cache ffmpeg
COPY --from=builder /build/cqhttp /usr/bin/cqhttp
RUN chmod +x /usr/bin/cqhttp
WORKDIR /data
ENTRYPOINT [ "/usr/bin/cqhttp" ]