fix(docker): declare ARG variables in runtime stage | ApprovalToken: 1767141135
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- Re-declare ARG variables (VERSION, BUILD_DATE, GIT_COMMIT, etc.) in runtime stage - Fixes UndefinedVar warnings for BUILD_DATE and VERSION - ARG variables must be declared in each stage where they are used
This commit is contained in:
@@ -89,6 +89,14 @@ RUN if [ -d "/build/.web" ] && [ -f "/build/.web/package.json" ]; then \
|
||||
# ============================================
|
||||
FROM ${BASE_IMAGE} AS runtime
|
||||
|
||||
# Re-declare build arguments for this stage
|
||||
ARG BASE_IMAGE=hub.peikarband.ir/peikarband/landing:base
|
||||
ARG VERSION=latest
|
||||
ARG BUILD_DATE
|
||||
ARG GIT_COMMIT
|
||||
ARG GIT_BRANCH
|
||||
ARG BUILD_NUMBER
|
||||
|
||||
LABEL org.opencontainers.image.title="Peikarband Landing"
|
||||
LABEL org.opencontainers.image.description="Peikarband hosting platform landing page"
|
||||
LABEL org.opencontainers.image.vendor="Peikarband"
|
||||
@@ -150,10 +158,7 @@ CMD ["reflex", "run", "--env", "prod", "--loglevel", "info"]
|
||||
# ============================================
|
||||
# Build Information
|
||||
# ============================================
|
||||
ARG GIT_COMMIT
|
||||
ARG GIT_BRANCH
|
||||
ARG BUILD_NUMBER
|
||||
|
||||
# ARG declarations are already done above in runtime stage
|
||||
LABEL git.commit="${GIT_COMMIT}"
|
||||
LABEL git.branch="${GIT_BRANCH}"
|
||||
LABEL build.number="${BUILD_NUMBER}"
|
||||
|
||||
Reference in New Issue
Block a user