diff --git a/.dockerignore b/.dockerignore index 1152f6a39..55cf8879b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,6 +8,9 @@ !/pumpkin*/ !/assets +# Allow build.rs to read git commit sha +!/.git + # Dependencies !Cargo.lock !Cargo.toml diff --git a/Dockerfile b/Dockerfile index 3bb3db73f..8fd638a94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM rust:1-alpine3.21 AS builder -ARG GIT_VERSION=Docker -ENV GIT_VERSION=$GIT_VERSION ENV RUSTFLAGS="-C target-feature=-crt-static" -RUN apk add --no-cache musl-dev +RUN apk add --no-cache musl-dev \ + # Required for git-version + git WORKDIR /pumpkin COPY . /pumpkin