-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 857 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 857 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
FROM rustlang/rust:nightly-bookworm-slim AS builder
RUN apt-get update && apt-get install -y libudev-dev pkg-config curl clang && rm -rf /var/lib/apt/lists/*
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN cargo binstall dioxus-cli --version 0.6.1 --force
WORKDIR /app
COPY Cargo.toml .
COPY Cargo.lock .
COPY assets/ ./assets/
COPY src/ ./src/
COPY Dioxus.toml .
COPY input.css .
COPY tailwind.config.js .
RUN ls -la /app
RUN dx build --release --platform web
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
WORKDIR /app
COPY --from=builder /app/target/dx/perfbot/release/web/server ./server
COPY --from=builder /app/target/dx/perfbot/release/web/public ./public/
ENTRYPOINT ./server