mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
fix inspect.Config usage
Signed-off-by: Robin Winkelewski <w9ncontact@gmail.com>
This commit is contained in:
parent
656bd87fd2
commit
1b06de3136
@ -702,9 +702,9 @@ func ConfigInspectToOCI(yaml *Image, inspect types.ImageInspect, idMap map[strin
|
||||
oci := specs.Spec{}
|
||||
runtime := Runtime{}
|
||||
|
||||
var inspectConfig container.Config
|
||||
inspectConfig := &container.Config{}
|
||||
if inspect.Config != nil {
|
||||
inspectConfig = *inspect.Config
|
||||
inspectConfig = inspect.Config
|
||||
}
|
||||
|
||||
// look for org.mobyproject.config label
|
||||
@ -721,7 +721,7 @@ func ConfigInspectToOCI(yaml *Image, inspect types.ImageInspect, idMap map[strin
|
||||
// command, env and cwd can be taken from image, as they are commonly specified in Dockerfile
|
||||
|
||||
// TODO we could handle entrypoint and cmd independently more like Docker
|
||||
inspectCommand := append(inspectConfig.Entrypoint, inspect.Config.Cmd...)
|
||||
inspectCommand := append(inspectConfig.Entrypoint, inspectConfig.Cmd...)
|
||||
args := assignStrings3(inspectCommand, label.Command, yaml.Command)
|
||||
|
||||
env := assignStrings3(inspectConfig.Env, label.Env, yaml.Env)
|
||||
|
Loading…
Reference in New Issue
Block a user