-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (30 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
44 lines (30 loc) · 1.02 KB
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
# ===============================================================
# Builder
# ===============================================================
FROM rust:slim-bullseye AS builder
RUN rustup target add x86_64-unknown-linux-gnu
RUN apt-get update && apt-get install cmake -y
RUN update-ca-certificates
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "10001" \
"lorelei"
WORKDIR /lorelei
COPY ./ .
RUN cargo build --release --target x86_64-unknown-linux-gnu
# ===============================================================
# Final image
# ===============================================================
FROM debian:bullseye-slim
RUN apt-get update && apt-get install python3-pip ffmpeg -y
RUN pip install -U yt-dlp
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
USER lorelei:lorelei
WORKDIR /lorelei
COPY --from=builder /lorelei/target/x86_64-unknown-linux-gnu/release/lorelei ./
CMD ["/lorelei/lorelei"]