-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (40 loc) · 1014 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM golang:1.23.4-alpine3.20 as go-builder
ENV LANG en_US.UTF-8
ENV TZ UTC
RUN set -eux && \
apk update && \
apk upgrade && \
apk add \
bash \
build-base \
ca-certificates \
curl \
git \
linux-headers \
make \
openssl-dev \
protobuf-dev \
protoc \
zlib-dev
WORKDIR /src
COPY --from=ghcr.io/awakari/tdlib:latest /usr/local/include/td /usr/local/include/td/
COPY --from=ghcr.io/awakari/tdlib:latest /usr/local/lib/libtd* /usr/local/lib/
COPY . /src
RUN make proto && go build \
-a \
-trimpath \
-ldflags "-s -w" \
-o source-telegram \
"./main.go" && \
ls -lah
FROM alpine:3.20
ENV LANG en_US.UTF-8
ENV TZ UTC
RUN apk upgrade --no-cache && \
apk add --no-cache \
ca-certificates \
libstdc++
COPY --from=go-builder /src/source-telegram /bin/source-telegram
COPY --from=go-builder /src/scripts/run.sh /bin/run.sh
COPY logo.jpg /logo.jpg
CMD ["/bin/run.sh"]