Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaniko doesn't change the value of upstream image variable value by build-arg #3344

Open
cniry opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@cniry
Copy link

cniry commented Oct 15, 2024

Actual behavior
Kaniko doesn't change the value of upstream image variable value by build-arg.

To Reproduce
Steps to reproduce the behavior:
Simplified example Dockerfile:

FROM alpine AS upstream-image
ENV HELLO=UPSTREAM

FROM upstream-image as my-build
ARG HELLO
RUN echo "Hello $HELLO"

Execute Kaniko build with build-argument:

/kaniko/executor --build-arg HELLO=WORLD  --context . --no-push

or Execute in Docker:

docker build --progress=plain  --build-arg  HELLO=WORLD .

Behavior
This docker file prints Hello WORLD in Docker, but prints Hello UPSTREAM in Kaniko.

Expected behavior
Upstream ENV value should be overridden by ARG.

Version
Tested on the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@cniry and others