From b89fdf9c9610a6aef8b886f39e4d9839ff2614fd Mon Sep 17 00:00:00 2001 From: Kappeh Date: Wed, 14 Jan 2026 14:55:57 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 54 +++++++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index 47a0522..0a56fe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,29 @@ -ARG RUST_VERSION=1.75.0 -ARG APP_NAME=minecraft_schematics_web +# Global build arguments +ARG RUST_VERSION=1.92.0 +# ----------- +# Build stage +# ----------- FROM rust:${RUST_VERSION}-slim-bullseye AS build - -# RUN apt-get update && apt-get install -y pkg-config libssl-dev - -ARG APP_NAME +# All build operations happen here WORKDIR /app - -RUN --mount=type=bind,source=src,target=src \ - --mount=type=bind,source=Cargo.toml,target=Cargo.toml \ - --mount=type=bind,source=Cargo.lock,target=Cargo.lock \ +# Build the application using Docker BuildKit mounts: +# - bind mounts for source files (not baked into the image) +# - cache mounts for faster incremental builds +RUN --mount=type=bind,source=src,target=src,readonly \ + --mount=type=bind,source=Cargo.toml,target=Cargo.toml,readonly \ + --mount=type=bind,source=Cargo.lock,target=Cargo.lock,readonly \ --mount=type=cache,target=/app/target \ --mount=type=cache,target=/usr/local/cargo/registry \ - <