31 lines
746 B
Docker
31 lines
746 B
Docker
FROM rg.fr-par.scw.cloud/asr-projects/dioxus-cli-0.6.3:latest AS builder
|
|
|
|
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
|
|
|
|
# git is required by the git-version crate
|
|
RUN apt update \
|
|
&& apt install -y --no-install-recommends git git-lfs \
|
|
&& apt clean
|
|
|
|
COPY . .
|
|
|
|
RUN git diff
|
|
RUN git describe --always --dirty=-modified
|
|
|
|
RUN dx build -r --platform web -- -j ${JOBS_NB}
|
|
|
|
RUN git diff
|
|
RUN git describe --always --dirty=-modified
|
|
|
|
|
|
FROM nginx:mainline-alpine-slim
|
|
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
COPY --from=builder /usr/src/beau-gosse-du-92/target/dx/beau-gosse-du-92/release/web/public .
|