-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathDockerfile.full
More file actions
36 lines (25 loc) · 783 Bytes
/
Copy pathDockerfile.full
File metadata and controls
36 lines (25 loc) · 783 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
# Frontend build stage
FROM node:22-alpine AS web-builder
WORKDIR /usr/src/bilistream/web
COPY web/package.json web/pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile
COPY web ./
RUN pnpm run build
# Rust build stage
FROM rust:alpine AS builder
RUN apk add --no-cache \
musl-dev \
pkgconfig
WORKDIR /usr/src/bilistream
COPY . .
COPY --from=web-builder /usr/src/bilistream/web/out ./web/out
RUN cargo build --release && \
strip target/release/bilistream && \
chmod +x target/release/bilistream
# Final runtime stage
FROM ghcr.io/jim60105/yt-dlp:latest
ENTRYPOINT []
WORKDIR /app
COPY --from=builder /usr/src/bilistream/target/release/bilistream /app/
COPY --from=builder /usr/src/bilistream/web/out /app/web/out
CMD ["/app/bilistream"]