forked from subscan-explorer/subscan-essentials
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
32 lines (25 loc) · 840 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
FROM golang:1.15.5 as builder
WORKDIR /subscan
COPY go.mod go.sum ./
RUN go mod download
COPY . /subscan
WORKDIR /subscan/cmd
RUN go build -o subscan
FROM buildpack-deps:buster-scm
WORKDIR subscan
COPY configs configs
COPY configs/redis.toml.example configs/redis.toml
COPY configs/mysql.toml.example configs/mysql.toml
COPY configs/http.toml.example configs/http.toml
COPY --from=builder /subscan/cmd/subscan cmd/subscan
COPY cmd/run.py cmd/run.py
WORKDIR cmd
RUN mkdir -p /subscan/log
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN apt-get update && apt-get install -y vim python3 python3-venv python3-pip
RUN pip3 install pyrogram && pip3 install requests && pip3 install TgCrypto
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
CMD ["/subscan/cmd/subscan"]
EXPOSE 4399