server: store and use image's stop signal to stop containers

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-05-26 18:31:28 +02:00
parent 7c43d34a1b
commit b4f1cee2a2
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9
57 changed files with 949 additions and 10084 deletions

View file

@ -19,12 +19,12 @@ import (
type ociImageDestination struct {
ref ociReference
index imgspecv1.ImageIndex
index imgspecv1.Index
}
// newImageDestination returns an ImageDestination for writing to an existing directory.
func newImageDestination(ref ociReference) types.ImageDestination {
index := imgspecv1.ImageIndex{
index := imgspecv1.Index{
Versioned: imgspec.Versioned{
SchemaVersion: 2,
},
@ -173,15 +173,13 @@ func (d *ociImageDestination) PutManifest(m []byte) error {
}
annotations := make(map[string]string)
annotations["org.opencontainers.ref.name"] = d.ref.tag
annotations["org.opencontainers.image.ref.name"] = d.ref.tag
desc.Annotations = annotations
d.index.Manifests = append(d.index.Manifests, imgspecv1.ManifestDescriptor{
Descriptor: desc,
Platform: imgspecv1.Platform{
Architecture: runtime.GOARCH,
OS: runtime.GOOS,
},
})
desc.Platform = &imgspecv1.Platform{
Architecture: runtime.GOARCH,
OS: runtime.GOOS,
}
d.index.Manifests = append(d.index.Manifests, desc)
return nil
}