dive-zfs/dive/image/docker/image_manifest.go
2019-09-22 11:50:05 -04:00

22 lines
435 B
Go

package docker
import (
"encoding/json"
"github.com/sirupsen/logrus"
)
type imageManifest struct {
ConfigPath string `json:"Config"`
RepoTags []string `json:"RepoTags"`
LayerTarPaths []string `json:"Layers"`
}
func newDockerImageManifest(manifestBytes []byte) imageManifest {
var manifest []imageManifest
err := json.Unmarshal(manifestBytes, &manifest)
if err != nil {
logrus.Panic(err)
}
return manifest[0]
}