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
|
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.title="Peikarband Landing"
|
||||||
LABEL org.opencontainers.image.description="Peikarband hosting platform landing page"
|
LABEL org.opencontainers.image.description="Peikarband hosting platform landing page"
|
||||||
LABEL org.opencontainers.image.vendor="Peikarband"
|
LABEL org.opencontainers.image.vendor="Peikarband"
|
||||||
@@ -150,10 +158,7 @@ CMD ["reflex", "run", "--env", "prod", "--loglevel", "info"]
|
|||||||
# ============================================
|
# ============================================
|
||||||
# Build Information
|
# Build Information
|
||||||
# ============================================
|
# ============================================
|
||||||
ARG GIT_COMMIT
|
# ARG declarations are already done above in runtime stage
|
||||||
ARG GIT_BRANCH
|
|
||||||
ARG BUILD_NUMBER
|
|
||||||
|
|
||||||
LABEL git.commit="${GIT_COMMIT}"
|
LABEL git.commit="${GIT_COMMIT}"
|
||||||
LABEL git.branch="${GIT_BRANCH}"
|
LABEL git.branch="${GIT_BRANCH}"
|
||||||
LABEL build.number="${BUILD_NUMBER}"
|
LABEL build.number="${BUILD_NUMBER}"
|
||||||
|
|||||||
Reference in New Issue
Block a user