From 035a87be75a97c0dfe3ea0eac62652b072282267 Mon Sep 17 00:00:00 2001 From: zxdsgz1412 Date: Fri, 10 Jul 2026 10:33:09 +0800 Subject: [PATCH] fix(docker): declare NGINX_BASE_IMAGE before first FROM for BuildKit ARG NGINX_BASE_IMAGE was declared inside the node build stage, so it was out of scope for the following FROM instruction. Newer BuildKit versions resolve it as blank and fail the frontend image build with: target paper2any-frontend: failed to solve: base name (${NGINX_BASE_IMAGE}) should not be blank Move the declaration to the global scope (before the first FROM), where FROM-level ARGs must live, keeping the same nginx:alpine default. Co-Authored-By: Claude Fable 5 --- frontend-workflow/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend-workflow/Dockerfile b/frontend-workflow/Dockerfile index e1f2236c..cdae32fd 100644 --- a/frontend-workflow/Dockerfile +++ b/frontend-workflow/Dockerfile @@ -1,4 +1,5 @@ ARG NODE_BASE_IMAGE=node:20-alpine +ARG NGINX_BASE_IMAGE=nginx:alpine FROM ${NODE_BASE_IMAGE} AS build ARG VITE_API_KEY= @@ -28,7 +29,7 @@ RUN cp -f .env.example .env.production || true && \ RUN npm run build -ARG NGINX_BASE_IMAGE=nginx:alpine +ARG NGINX_BASE_IMAGE FROM ${NGINX_BASE_IMAGE} COPY frontend-workflow/nginx.conf.template /etc/nginx/templates/default.conf.template