mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-09-30 13:15:38 +02:00
Merge pull request #1234 from tejal29/fix_copy_from
Apply dockefile exclude only for first stage
This commit is contained in:
@@ -596,6 +596,7 @@ func DoBuild(opts *config.KanikoOptions) (v1.Image, error) {
|
||||
}
|
||||
logrus.Infof("Built cross stage deps: %v", crossStageDependencies)
|
||||
|
||||
util.IsFirstStage = true
|
||||
for index, stage := range kanikoStages {
|
||||
sb, err := newStageBuilder(opts, stage, crossStageDependencies, digestToCacheKey, stageIdxToDigest, stageNameToIdx)
|
||||
if err != nil {
|
||||
@@ -604,6 +605,7 @@ func DoBuild(opts *config.KanikoOptions) (v1.Image, error) {
|
||||
if err := sb.build(); err != nil {
|
||||
return nil, errors.Wrap(err, "error building stage")
|
||||
}
|
||||
util.IsFirstStage = false
|
||||
|
||||
reviewConfig(stage, &sb.cf.Config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user