From 63cdded59117fee577d74ee85d888e9bb65d937a Mon Sep 17 00:00:00 2001 From: Sammy ETUR Date: Thu, 12 Feb 2026 04:28:36 +0100 Subject: [PATCH] Fix dockerfile for podman MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit podman build runs RUN ... with /bin/sh -c by default, and many /bin/sh implementations don’t have the source builtin --- docker/Dockerfile.alpine | 6 +++--- docker/Dockerfile.debian | 9 +++++---- docker/Dockerfile.j2 | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index f006f5b4..7ee59676 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -71,7 +71,7 @@ RUN echo "export CARGO_TARGET=${RUST_MUSL_CROSS_TARGET}" >> /env-cargo && \ # Output the current contents of the file cat /env-cargo -RUN source /env-cargo && \ +RUN . /env-cargo && \ rustup target add "${CARGO_TARGET}" # Copies over *only* your manifests and build files @@ -87,7 +87,7 @@ ARG DB=sqlite,mysql,postgresql,enable_mimalloc # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies -RUN source /env-cargo && \ +RUN . /env-cargo && \ cargo build --features ${DB} --profile "${CARGO_PROFILE}" --target="${CARGO_TARGET}" && \ find . -not -path "./target*" -delete @@ -98,7 +98,7 @@ COPY . . ARG VW_VERSION # Builds again, this time it will be the actual source files being build -RUN source /env-cargo && \ +RUN . /env-cargo && \ # Make sure that we actually build the project by updating the src/main.rs timestamp # Also do this for build.rs to ensure the version is rechecked touch build.rs src/main.rs && \ diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index 449bbcfd..7d07c74c 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -86,7 +86,8 @@ WORKDIR /app # Environment variables for Cargo on Debian based builds ARG TARGET_PKG_CONFIG_PATH -RUN source /env-cargo && \ + +RUN . /env-cargo && \ if xx-info is-cross ; then \ # We can't use xx-cargo since that uses clang, which doesn't work for our libraries. # Because of this we generate the needed environment variables here which we can load in the needed steps. @@ -106,7 +107,7 @@ RUN source /env-cargo && \ # Output the current contents of the file cat /env-cargo -RUN source /env-cargo && \ +RUN . /env-cargo && \ rustup target add "${CARGO_TARGET}" # Copies over *only* your manifests and build files @@ -121,7 +122,7 @@ ARG DB=sqlite,mysql,postgresql # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies -RUN source /env-cargo && \ +RUN . /env-cargo && \ cargo build --features ${DB} --profile "${CARGO_PROFILE}" --target="${CARGO_TARGET}" && \ find . -not -path "./target*" -delete @@ -132,7 +133,7 @@ COPY . . ARG VW_VERSION # Builds again, this time it will be the actual source files being build -RUN source /env-cargo && \ +RUN . /env-cargo && \ # Make sure that we actually build the project by updating the src/main.rs timestamp # Also do this for build.rs to ensure the version is rechecked touch build.rs src/main.rs && \ diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 index f745780e..eb1a9ee0 100644 --- a/docker/Dockerfile.j2 +++ b/docker/Dockerfile.j2 @@ -106,7 +106,7 @@ WORKDIR /app # Environment variables for Cargo on Debian based builds ARG TARGET_PKG_CONFIG_PATH -RUN source /env-cargo && \ +RUN . /env-cargo /env-cargo && \ if xx-info is-cross ; then \ # We can't use xx-cargo since that uses clang, which doesn't work for our libraries. # Because of this we generate the needed environment variables here which we can load in the needed steps. @@ -133,7 +133,7 @@ RUN echo "export CARGO_TARGET=${RUST_MUSL_CROSS_TARGET}" >> /env-cargo && \ cat /env-cargo {% endif %} -RUN source /env-cargo && \ +RUN . /env-cargo /env-cargo && \ rustup target add "${CARGO_TARGET}" # Copies over *only* your manifests and build files @@ -153,7 +153,7 @@ ARG DB=sqlite,mysql,postgresql,enable_mimalloc # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies -RUN source /env-cargo && \ +RUN . /env-cargo /env-cargo && \ cargo build --features ${DB} --profile "${CARGO_PROFILE}" --target="${CARGO_TARGET}" && \ find . -not -path "./target*" -delete @@ -164,7 +164,7 @@ COPY . . ARG VW_VERSION # Builds again, this time it will be the actual source files being build -RUN source /env-cargo && \ +RUN . /env-cargo /env-cargo && \ # Make sure that we actually build the project by updating the src/main.rs timestamp # Also do this for build.rs to ensure the version is rechecked touch build.rs src/main.rs && \