23 lines
556 B
Docker
23 lines
556 B
Docker
FROM rust:latest AS builder
|
|
|
|
# Homemade docker image providing the dioxus-cli
|
|
COPY --from=rg.fr-par.scw.cloud/asr-projects/dioxus-cli:6ff7a54 /usr/local/bin/dx /usr/local/bin/dx
|
|
|
|
ARG JOBS_NB=${JOBS_NB:-default}
|
|
# 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 . .
|
|
|
|
RUN dx build -r --platform web -- -j ${JOBS_NB}
|
|
|
|
|
|
FROM nginx:mainline-alpine-slim
|
|
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
COPY --from=builder /usr/src/beau-gosse-du-92/dist .
|