forked from rainerosion/E5SubBotForSQLite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (12 loc) · 652 Bytes
/
Dockerfile
File metadata and controls
20 lines (12 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:alpine AS builder
WORKDIR /root
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk update && apk add git gcc g++\
&& git clone https://github.com/rainerosion/E5SubBot.git \
&& cd E5SubBot && GOPROXY=https://goproxy.cn,direct CGO_ENABLED=1 go build
FROM alpine:latest
ENV TIME_ZONE=Asia/Shanghai
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk update && apk add tzdata \
&& 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" ]