From 357b618262f2ac8a00e25ce5d1532255e4da481f Mon Sep 17 00:00:00 2001 From: Adrien Date: Fri, 12 Apr 2024 20:31:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Disable=20incremental=20compilat?= =?UTF-8?q?ion=20and=20use=20a=20single=20core=20to=20reduce=20the=20RAM?= =?UTF-8?q?=20consumption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 078c184..8d31add 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ 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 dioxus-cli -RUN dx build -r --platform web +RUN cargo install -j 1 dioxus-cli +RUN dx build -r --platform web -- -j 1 FROM nginx:mainline-alpine-slim