Dockerfile 497 B

12345678910111213141516171819202122232425
  1. FROM golang:1.18.10-alpine3.16 AS builder
  2. # ENV GOPROXY https://goproxy.io
  3. RUN mkdir /app
  4. ADD . /app/
  5. WORKDIR /app
  6. RUN go build -o chatgpt-dingtalk .
  7. FROM alpine:3.16
  8. ARG TZ="Asia/Shanghai"
  9. ENV TZ ${TZ}
  10. RUN mkdir /app && apk upgrade \
  11. && apk add bash tzdata \
  12. && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
  13. && echo ${TZ} > /etc/timezone
  14. WORKDIR /app
  15. COPY --from=builder /app/ .
  16. RUN chmod +x chatgpt-dingtalk && cp config.example.yml config.yml
  17. CMD ./chatgpt-dingtalk