config: Add 'ucode' to the kernel schema

This optional option will allow users to specify a CPU
microcode cpio archive to be prepended to the initrd file.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2018-01-15 13:49:07 +00:00
parent f816553d2f
commit b4704b8ba1
2 changed files with 6 additions and 1 deletions

View File

@ -36,6 +36,7 @@ type KernelConfig struct {
Cmdline string `yaml:"cmdline,omitempty" json:"cmdline,omitempty"`
Binary string `yaml:"binary,omitempty" json:"binary,omitempty"`
Tar *string `yaml:"tar,omitempty" json:"tar,omitempty"`
UCode *string `yaml:"ucode,omitempty" json:"ucode,omitempty"`
ref *reference.Spec
}
@ -289,6 +290,9 @@ func AppendConfig(m0, m1 Moby) (Moby, error) {
if m1.Kernel.Tar != nil {
moby.Kernel.Tar = m1.Kernel.Tar
}
if m1.Kernel.UCode != nil {
moby.Kernel.UCode = m1.Kernel.UCode
}
if m1.Kernel.ref != nil {
moby.Kernel.ref = m1.Kernel.ref
}

View File

@ -13,7 +13,8 @@ var schema = string(`
"image": {"type": "string"},
"cmdline": {"type": "string"},
"binary": {"type": "string"},
"tar": {"type": "string"}
"tar": {"type": "string"},
"ucode": {"type": "string"}
}
},
"file": {