-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (26 loc) · 792 Bytes
/
Dockerfile
File metadata and controls
40 lines (26 loc) · 792 Bytes
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
FROM golang:1.25 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go generate
RUN CGO_ENABLED=0 GOOS=linux go build -o bot main.go
FROM debian:bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
ca-certificates \
zlib1g \
tzdata \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget -O /usr/local/bin/yt-dlp \
https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp_linux \
&& chmod +x /usr/local/bin/yt-dlp
RUN curl -fsSL https://deno.land/install.sh | sh \
&& ln -sf /root/.deno/bin/deno /usr/local/bin/deno
ENV DENO_INSTALL="/root/.deno"
ENV PATH="${DENO_INSTALL}/bin:${PATH}"
COPY --from=builder /app/bot .
COPY --from=builder /app/libtdjson.so.* ./
CMD ["./bot"]