kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

Problem with capital case letters in FROM...AS image name

Open bbkgh opened this issue 2 years ago • 4 comments

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

bbkgh avatar Mar 05 '22 16:03 bbkgh

Kaniko shares Dockerfile parsing logic with docker itself. Does this work with docker build?

imjasonh avatar Mar 05 '22 16:03 imjasonh

Yes, tested with docker 20.10.7 .

bbkgh avatar Mar 05 '22 18:03 bbkgh

Duplicate of #1298 ?

darkdragon-001 avatar Apr 19 '22 08:04 darkdragon-001

We got this problem too

iamkhalidbashir avatar Aug 23 '22 12:08 iamkhalidbashir