Add Docker Support
This commit is contained in:
parent
d68063f429
commit
7dd7765dda
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM golang:alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
RUN apk update && apk add git \
|
||||||
|
&& git clone https://github.com/iyear/E5SubBot.git \
|
||||||
|
&& cd E5SubBot && go build
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
ENV TIME_ZONE=Asia/Shanghai
|
||||||
|
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
COPY --from=builder /root/E5SubBot/main /root
|
||||||
|
|
||||||
|
CMD [ "/root/main" ]
|
||||||
Loading…
Reference in New Issue
Block a user