kaniko
kaniko copied to clipboard
Problem with capital case letters in FROM...AS image name
Actual behavior When i use CAPITALIZED image name in from..as section (in multi-stage builds) kaniko fails to build image. When i lower image name it works perfectly.
Expected behavior Same behavior in capitalized and lower forms.
To Reproduce Dockerfile1 (capitalized):
FROM nginx as BUILD
from python
copy --from=BUILD /etc/nginx /etc/
results to:
INFO[2022-03-05T16:33:58Z] Retrieving image manifest BUILD
error building image: could not parse reference: BUILD
Dockerfile2 (lower):
FROM nginx as build
from python
copy --from=build /etc/nginx /etc/
kaniko builds this.
build commad:
/kaniko/executor --context=dir://. --dockerfile=./Dockerfile \
--context-sub-path . --cache --log-timestamp=true --skip-unused-stages \
--destination=mysite.com/x/test-build:0bb431d5 \
--destination=mysite.com/x/test-build:main \
--push-retry=3 --use-new-run -v=info ;
Additional Information
- Kaniko Image : kaniko:v1.6.0-debug
Kaniko shares Dockerfile parsing logic with docker
itself. Does this work with docker build
?
Yes, tested with docker 20.10.7 .
Duplicate of #1298 ?
We got this problem too