You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("invalid flag combination: if specifying --builder-image then --binary-image can only be \"scratch\" or default")
60
+
}
61
+
// user specifed only the builder image, set binary image to scratch
62
+
caseinCmd.Flags().Changed("builder-image"):
63
+
binaryImage="scratch"
64
+
}
65
+
50
66
extraLabels, err:=parseLabels(extraLabelStrs)
51
67
iferr!=nil {
52
68
returnerr
@@ -72,20 +88,20 @@ value of each duplicate key will be added to the generated Dockerfile.
72
88
deferf.Close()
73
89
74
90
gen:= action.GenerateDockerfile{
75
-
BaseImage: baseImage,
76
-
IndexDir: indexName,
77
-
ExtraLabels: extraLabels,
78
-
Writer: f,
79
-
Lite: lite,
91
+
BaseImage: binaryImage,
92
+
BuilderImage: builderImage,
93
+
IndexDir: indexName,
94
+
ExtraLabels: extraLabels,
95
+
Writer: f,
80
96
}
81
97
iferr:=gen.Run(); err!=nil {
82
98
log.Fatal(err)
83
99
}
84
100
returnnil
85
101
},
86
102
}
87
-
cmd.Flags().StringVarP(&baseImage, "binary-image", "i", containertools.DefaultBinarySourceImage, "Image in which to build catalog.")
88
-
cmd.Flags().BoolVarP(&lite, "lite", "t", false, "Generate a smaller, binary-less Dockerfile.")
103
+
cmd.Flags().StringVarP(&binaryImage, "binary-image", "i", containertools.DefaultBinarySourceImage, "Image in which to build catalog.")
104
+
cmd.Flags().StringVarP(&builderImage, "builder-image", "b", containertools.DefaultBinarySourceImage, "Image to use as a build stage.")
89
105
cmd.Flags().StringSliceVarP(&extraLabelStrs, "extra-labels", "l", []string{}, "Extra labels to include in the generated Dockerfile. Labels should be of the form 'key=value'.")
0 commit comments