mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-11-13 08:17:32 +00:00
Add support for override of parameters using a label
Using the label `org.mobyproject.config` will use that JSON (or yaml, but it is very hard to get yaml into a label as newlines are not respected) for parameters that are not explicitly set in the yaml file. Had to change parameter definitions so override behaves as expected. fix #16 Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
@@ -125,7 +125,7 @@ func enforceContentTrust(fullImageName string, config *TrustConfig) bool {
|
||||
|
||||
// Perform the actual build process
|
||||
// TODO return error not panic
|
||||
func buildInternal(m *Moby, name string, pull bool) []byte {
|
||||
func buildInternal(m Moby, name string, pull bool) []byte {
|
||||
w := new(bytes.Buffer)
|
||||
iw := tar.NewWriter(w)
|
||||
|
||||
@@ -177,7 +177,7 @@ func buildInternal(m *Moby, name string, pull bool) []byte {
|
||||
}
|
||||
for i, image := range m.Onboot {
|
||||
log.Infof(" Create OCI config for %s", image.Image)
|
||||
config, err := ConfigToOCI(&image)
|
||||
config, err := ConfigToOCI(image)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create config.json for %s: %v", image.Image, err)
|
||||
}
|
||||
@@ -196,7 +196,7 @@ func buildInternal(m *Moby, name string, pull bool) []byte {
|
||||
}
|
||||
for _, image := range m.Services {
|
||||
log.Infof(" Create OCI config for %s", image.Image)
|
||||
config, err := ConfigToOCI(&image)
|
||||
config, err := ConfigToOCI(image)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create config.json for %s: %v", image.Image, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user