Resolve env replacement for FROM command

This commit is contained in:
Priya Wadhwa
2018-06-04 11:51:33 -07:00
parent a641ae0b10
commit 44d7266058
3 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -63,7 +63,10 @@ func DoBuild(dockerfilePath, srcContext, snapshotMode string, args []string) (na
return nil, nil, err
}
for index, stage := range stages {
baseImage := stage.BaseName
baseImage, err := util.ResolveEnvironmentReplacement(stage.BaseName, args, false)
if err != nil {
return nil, nil, err
}
finalStage := index == len(stages)-1
// Unpack file system to root
logrus.Infof("Unpacking filesystem of %s...", baseImage)