-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathDockerfile
46 lines (28 loc) · 780 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Builder
FROM --platform=$BUILDPLATFORM whatwewant/builder-go:v1.20-1 as builder
WORKDIR /build
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . .
ARG TARGETARCH
RUN CGO_ENABLED=0 \
GOOS=linux \
GOARCH=$TARGETARCH \
go build \
-trimpath \
-ldflags '-w -s -buildid=' \
-v -o chatgpt-for-chatbot-feishu
# Server
FROM whatwewant/go:v1.20-1
# FROM whatwewant/zmicro:v1
LABEL MAINTAINER="Zero<[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/go-zoox/chatgpt-for-chatbot-feishu"
ARG VERSION=latest
ENV MODE=production
COPY --from=builder /build/chatgpt-for-chatbot-feishu /bin
ENV VERSION=${VERSION}
RUN zmicro package install ngrok
# RUN zmicro package install cpolar
COPY ./entrypoint.sh /
CMD /entrypoint.sh