Skip to content

Commit 4fd80f3

Browse files
authored
Merge pull request #13 from infosiftr/supported-arches
Add a package for converting from a "bashbrew arch" to a full OCI "platform" object (os+arch+variant)
2 parents ce3ef0e + b33efdf commit 4fd80f3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

architecture/oci-platform.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package architecture
2+
3+
// https://github.com/opencontainers/image-spec/blob/v1.0.0-rc6/image-index.md#image-index-property-descriptions
4+
// see "platform" (under "manifests")
5+
type OCIPlatform struct {
6+
OS string `json:"os"`
7+
Architecture string `json:"architecture"`
8+
Variant string `json:"variant,omitempty"`
9+
10+
//OSVersion string `json:"os.version,omitempty"`
11+
//OSFeatures []string `json:"os.features,omitempty"`
12+
}
13+
14+
var SupportedArches = map[string]OCIPlatform{
15+
"amd64": {OS: "linux", Architecture: "amd64"},
16+
"arm32v5": {OS: "linux", Architecture: "arm", Variant: "v5"},
17+
"arm32v6": {OS: "linux", Architecture: "arm", Variant: "v6"},
18+
"arm32v7": {OS: "linux", Architecture: "arm", Variant: "v7"},
19+
"arm64v8": {OS: "linux", Architecture: "arm64", Variant: "v8"},
20+
"i386": {OS: "linux", Architecture: "386"},
21+
"ppc64le": {OS: "linux", Architecture: "ppc64le"},
22+
"s390x": {OS: "linux", Architecture: "s390x"},
23+
24+
"windows-amd64": {OS: "windows", Architecture: "amd64"},
25+
}

0 commit comments

Comments
 (0)