blob: 898b524de3fb16cc0c265319387ba6b29f811afd (
plain) (
blame)
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
|
FROM alpine:3.18 as builder
ENV GOPROXY=https://goproxy.io
ENV ALL_PROXY=socks5://192.168.1.214:9995
ENV HTTPS_PROXY=socks5://192.168.1.214:9995
RUN apk update && apk upgrade
RUN apk add go git
ENV GOPROXY=https://goproxy.io
COPY go.* /telebot/
RUN cd /telebot && go mod download
COPY *.go /telebot/
RUN cd /telebot && go build
FROM alpine:3.18 as certbuilder
RUN apk add openssl
WORKDIR /certs
RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=localhost" -keyout server.key -out server.cert
# FROM gcr.io/distroless/static-debian10
FROM alpine:3.18
COPY --from=certbuilder /certs /certs
COPY --from=builder /telebot/telebot /telebot/
COPY ./docker-entrypoint.sh /telebot/
ENV ALL_PROXY=
ENV HTTPS_PROXY=
ENTRYPOINT ["/telebot/docker-entrypoint.sh"]
|