forked from youki-dev/oci-spec-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not panic if windows.layerFolder is null
If windows layerFolders in null string then loading of the runtime spec fails. This happens when containerd serializes Windows{} portion of the spec due to the way golang serializes lists. Although the runtime spec says this is a required field, containerd 1.6 and 1.7 do not fill this field resulting in a null value when serialized to disk. See opencontainers/runtime-spec#1185 for discusion of this field in the runtime spec. Signed-off-by: James Sturtevant <[email protected]>
- Loading branch information
1 parent
bed58f0
commit fb26b7f
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"ociVersion": "0.5.0-dev", | ||
"process": { | ||
"terminal": true, | ||
"user": { | ||
"uid": 1, | ||
"gid": 1, | ||
"username": "ContainerUser" | ||
}, | ||
"args": [ | ||
"cmd" | ||
], | ||
"env": [ | ||
"PATH=C:\\Windows\\system32;C:\\Windows;" | ||
], | ||
"cwd": "C:\\" | ||
}, | ||
"root": { | ||
"path": "" | ||
}, | ||
"hostname": "slartibartfast", | ||
"mounts": [ | ||
], | ||
"hooks": { | ||
}, | ||
"linux": { | ||
}, | ||
"windows": { | ||
"layerFolders": null, | ||
"resources": { | ||
"cpu": { | ||
"shares": 2 | ||
} | ||
}, | ||
"network": { | ||
"networkNamespace": "1124faf5-e1d3-43fe-b758-8e99e5b7fa02" | ||
} | ||
}, | ||
"annotations": { | ||
"com.example.key1": "value1", | ||
"com.example.key2": "value2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters