-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (29 loc) · 921 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
# https://hub.docker.com/_/golang/tags
FROM golang:1.23.2 AS build
#ARG TARGETARCH
#
#RUN apt update
#RUN apt -y -q install xz-utils
#
#RUN mkdir -p /root/ffmpeg/
#WORKDIR /root/ffmpeg/
#RUN curl -s -S -L -O https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-$TARGETARCH-static.tar.xz
#RUN tar -x -J -f ffmpeg-release-$TARGETARCH-static.tar.xz
#RUN mv ffmpeg-*-static/ffmpeg ffmpeg
#RUN ls -l -a
#RUN ./ffmpeg -version
RUN mkdir -p /root/tgzebot/
WORKDIR /root/tgzebot/
COPY tgzebot.go go.mod go.sum /root/tgzebot/
RUN go version
RUN go get -a -v
RUN go build -o tgzebot tgzebot.go
RUN ls -l -a
# https://hub.docker.com/_/alpine/tags
FROM alpine:3.20.3
RUN apk add --no-cache tzdata
RUN apk add --no-cache gcompat && ln -s -f -v ld-linux-x86-64.so.2 /lib/libresolv.so.2
#COPY --from=build /root/ffmpeg/ffmpeg /bin/
COPY --from=build /root/tgzebot/tgzebot /bin/
WORKDIR /root/
ENTRYPOINT ["/bin/tgzebot"]