kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

Kaniko multi-stage dockerfile build issue

Open harshadjoshi619 opened this issue 1 year ago • 5 comments

Actual behavior I am using kaniko-project/executor:v1.17.0-slim in my tekton pipeline. In case of normal dockerfiles it is working as expected but when we try with multi-stage dockerfiles it is giving me below error:

error pushing image: failed to push to destination ".../.../" UNAUTHORISED user is unauthorised to upload to ".../.../"

Expected behavior Kaniko should upload multi-stage dockerfile image to artifactory

To Reproduce Steps to reproduce the behavior:

  1. create a dockerfile with multiple FROM statements in it
  2. use kaniko version as kaniko-project/executor:v1.17.0-slim

Additional Information

I am already using /kaniko/.docker to store my credentials. Still facing same issue.

Kindly suggest some way to overcome this issue.

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
  • - [ ]
Please check if the build works in docker but not in kaniko
  • - [ ]
Please check if this error is seen when you use --cache flag
  • - [ ]
Please check if your dockerfile is a multistage dockerfile
  • - [ ]

harshadjoshi619 avatar Nov 07 '23 10:11 harshadjoshi619

@harshadjoshi619 thanks for flagging this issue. To help debug this, can you post the entire logs from the failing run (with any sensitive info redacted), preferably running with verbose logs - eg: --verbosity=debug. If you have a small repro docker file/repro-project that would be helpful as well. Currently I am a bit confused if the issue here is referring to kaniko not being able to push multi-stage images to JFrog Artifactory or if kaniko is not able to pull down intermediate FROM images in a multi-stage build from JFrog Artifactory

aaron-prindle avatar Nov 10 '23 19:11 aaron-prindle

I have the same problem. I found out, that kaniko deletes the docker configuration file in /root/.docker. I think it's the same issue as #2764

frami avatar Nov 20 '23 13:11 frami

Maybe related to #2576 ?

atorrembo avatar Dec 03 '23 01:12 atorrembo

What progress has been made

zijiwork avatar Jan 12 '24 08:01 zijiwork