From 4add49b2608e37cd98df74c6b263f772aaef4ab6 Mon Sep 17 00:00:00 2001 From: Adrien Date: Mon, 15 Apr 2024 22:54:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Use=20of=20the=20homemade=20diox?= =?UTF-8?q?ux-cli=20docker=20image=20to=20reduce=20building=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 126bf84..122f8ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM rust:latest AS builder -ARG JOBS_NB=${JOBS_NB:-default} +# Homemade docker image providing the dioxus-cli +COPY --from=dioxus-cli:asr-0.5.2 /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 @@ -10,8 +12,7 @@ WORKDIR /usr/src/beau-gosse-du-92 COPY . . -RUN cargo install -j ${JOBS_NB} dioxus-cli -RUN dx build -r --platform web -- -j ${JOBS_NB} +RUN /usr/local/bin/dx build -r --platform web -- -j ${JOBS_NB} FROM nginx:mainline-alpine-slim