23 lines
494 B
Docker
23 lines
494 B
Docker
FROM rust:latest AS builder
|
|
|
|
# Disable incremental compilation
|
|
# Cf. https://doc.rust-lang.org/cargo/reference/profiles.html#incremental
|
|
ARG CARGO_INCREMENTAL=0
|
|
|
|
WORKDIR /usr/src/beau-gosse-du-92
|
|
|
|
COPY ./fonts ./fonts
|
|
COPY ./images ./images
|
|
COPY ./Dioxus.toml .
|
|
COPY Cargo.* .
|
|
COPY ./build.rs .
|
|
COPY ./src ./src
|
|
|
|
RUN cargo install -j 1 dioxus-cli
|
|
RUN dx build -r --platform web -- -j 1
|
|
|
|
|
|
FROM nginx:mainline-alpine-slim
|
|
|
|
COPY --from=builder /usr/src/beau-gosse-du-92/dist /usr/share/nginx/html
|