From ba5f5cf7d67c1df39b5e51d27b28e8db92b64770 Mon Sep 17 00:00:00 2001 From: kikootwo Date: Fri, 9 Jan 2026 20:12:42 -0500 Subject: [PATCH] Move ARG declarations after FROM in Dockerfile Re-declared build arguments GIT_COMMIT and BUILD_DATE after the FROM instruction to ensure they are available in subsequent build stages, as ARGs before FROM are not accessible after the base image is set. --- dockerfile.unified | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dockerfile.unified b/dockerfile.unified index 7864e02..5fb6658 100644 --- a/dockerfile.unified +++ b/dockerfile.unified @@ -2,13 +2,13 @@ # Single container with PostgreSQL, Redis, and Next.js app # Designed for easy deployment with minimal configuration -# Build arguments for version info -ARG GIT_COMMIT=unknown -ARG BUILD_DATE=unknown - # Start from debian base with node preinstalled FROM node:20-bookworm AS base +# Re-declare build arguments after FROM (ARGs before FROM are not available after) +ARG GIT_COMMIT=unknown +ARG BUILD_DATE=unknown + # Install PostgreSQL 16 repository key RUN apt-get update && apt-get install -y curl gnupg && \ install -d /etc/apt/keyrings && \