File tree Expand file tree Collapse file tree 2 files changed +12
-24
lines changed Expand file tree Collapse file tree 2 files changed +12
-24
lines changed Original file line number Diff line number Diff line change @@ -26,28 +26,12 @@ import (
2626 "strings"
2727
2828 "github.com/opencontainers/image-spec/schema"
29+ "github.com/opencontainers/image-spec/specs-go/v1"
2930 "github.com/opencontainers/runtime-spec/specs-go"
3031 "github.com/pkg/errors"
3132)
3233
33- type cfg struct {
34- User string
35- Memory int64
36- MemorySwap int64
37- CPUShares int64 `json:"CpuShares"`
38- ExposedPorts map [string ]struct {}
39- Env []string
40- Entrypoint []string
41- Cmd []string
42- Volumes map [string ]struct {}
43- WorkingDir string
44- }
45-
46- type config struct {
47- Architecture string `json:"architecture"`
48- OS string `json:"os"`
49- Config cfg `json:"config"`
50- }
34+ type config v1.Image
5135
5236func findConfig (w walker , d * descriptor ) (* config , error ) {
5337 var c config
Original file line number Diff line number Diff line change 1414
1515package schema
1616
17- import "net/http"
17+ import (
18+ "net/http"
19+
20+ "github.com/opencontainers/image-spec/specs-go/v1"
21+ )
1822
1923// Media types for the OCI image formats
2024const (
21- MediaTypeDescriptor Validator = `application/vnd.oci.descriptor.v1+json`
22- MediaTypeManifest Validator = `application/vnd.oci.image.manifest.v1+json`
23- MediaTypeManifestList Validator = `application/vnd.oci.image.manifest.list.v1+json`
24- MediaTypeImageConfig Validator = `application/vnd.oci.image.config.v1+json`
25- MediaTypeImageLayer unimplemented = `application/vnd.oci.image.layer.tar+gzip`
25+ MediaTypeDescriptor Validator = v1 . MediaTypeDescriptor
26+ MediaTypeManifest Validator = v1 . MediaTypeImageManifest
27+ MediaTypeManifestList Validator = v1 . MediaTypeImageManifestList
28+ MediaTypeImageConfig Validator = v1 . MediaTypeImageConfig
29+ MediaTypeImageLayer unimplemented = v1 . MediaTypeImageLayer
2630)
2731
2832var (
You can’t perform that action at this time.
0 commit comments