Skip to content

Commit bf96365

Browse files
authored
Merge pull request #32 from coolljt0725/error_out_not_layers
Error out if rootfs type is not layers
2 parents f800da8 + f2530f1 commit bf96365

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

image/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ func findConfig(w walker, d *descriptor) (*config, error) {
5353
if err := json.Unmarshal(buf, &c); err != nil {
5454
return err
5555
}
56+
// check if the rootfs type is 'layers'
57+
if c.RootFS.Type != "layers" {
58+
return fmt.Errorf("'%s' is an unknown rootfs type, MUST be 'layers'", c.RootFS.Type)
59+
}
5660
return errEOW
5761
}); err {
5862
case nil:

0 commit comments

Comments
 (0)