We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b91170d commit 5e4b165Copy full SHA for 5e4b165
Dockerfile
@@ -1,5 +1,10 @@
1
-FROM golang
2
-COPY . go_wechaty_examples
+FROM golang AS builder
+WORKDIR /root/
3
+COPY . src
4
ENV GOPROXY https://goproxy.io,direct
-RUN cd go_wechaty_examples && make test
5
-ENTRYPOINT ./go_wechaty_examples/ding-dong-bot
+RUN cd src && CGO_ENABLED=0 GOOS=linux go build -o ding-dong-bot -v ./examples/ding-dong-bot.go
6
+
7
+FROM alpine AS prod
8
9
+COPY --from=builder /root/src/ding-dong-bot .
10
+ENTRYPOINT ["./ding-dong-bot"]
0 commit comments