Skip to content

Commit e4abacf

Browse files
authored
Merge pull request #294 from WaberZhuang/main
convertor: support reference API
2 parents 0f22718 + 958e2dd commit e4abacf

File tree

43 files changed

+626
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+626
-11
lines changed

.github/workflows/ci-userspace-convertor.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,20 @@ jobs:
6969
/opt/overlaybd/snapshotter/convertor -r localhost:5000/redis -i 7.2.3 --overlaybd 7.2.3_overlaybd --turboOCI 7.2.3_turbo
7070
bash run_container.sh localhost:5000/redis:7.2.3_overlaybd
7171
bash run_container.sh localhost:5000/redis:7.2.3_turbo
72+
73+
- name: install Go
74+
uses: actions/setup-go@v5
75+
with:
76+
go-version: '1.22.0'
77+
78+
- name: set env
79+
shell: bash
80+
run: |
81+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
82+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
83+
84+
- name: CI - E2E Go Test
85+
working-directory: ci/e2e
86+
shell: bash
87+
run: |
88+
go test -v ./...

ci/e2e/convert/referrer_test.go

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
/*
2+
Copyright The Accelerated Container Image Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package convert_test
18+
19+
import (
20+
"context"
21+
"encoding/json"
22+
"fmt"
23+
"io"
24+
"os/exec"
25+
"path/filepath"
26+
"runtime"
27+
"testing"
28+
29+
dockerspec "github.com/containerd/containerd/v2/core/images"
30+
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
31+
"github.com/stretchr/testify/require"
32+
"oras.land/oras-go/v2"
33+
"oras.land/oras-go/v2/content/oci"
34+
"oras.land/oras-go/v2/registry"
35+
"oras.land/oras-go/v2/registry/remote"
36+
)
37+
38+
const (
39+
ArtifactTypeOverlaybd = "application/vnd.containerd.overlaybd.native.v1+json"
40+
ArtifactTypeTurboOCI = "application/vnd.containerd.overlaybd.turbo.v1+json"
41+
42+
TestRepository = "localhost:5000/hello-world"
43+
)
44+
45+
func TestConvertReferrer(t *testing.T) {
46+
ctx := context.Background()
47+
require := require.New(t)
48+
49+
if err := copyImageToRegistry(ctx); err != nil {
50+
t.Fatal(err)
51+
}
52+
53+
repo, err := remote.NewRepository(TestRepository)
54+
require.Nil(err, err)
55+
repo.SetReferrersCapability(true)
56+
57+
fetchJSON := func(src ocispec.Descriptor, v any) {
58+
rc, err := repo.Fetch(ctx, src)
59+
require.Nil(err, err)
60+
defer rc.Close()
61+
bytes, err := io.ReadAll(rc)
62+
require.Nil(err, err)
63+
err = json.Unmarshal(bytes, v)
64+
require.Nil(err, err)
65+
66+
t.Logf("fetch %s, content:\n%s", src.Digest.String(), string(bytes))
67+
}
68+
69+
var checkReferrer func(src, dst ocispec.Descriptor, artifactType string)
70+
checkReferrer = func(src, dst ocispec.Descriptor, artifactType string) {
71+
t.Logf("checking src %v to dst %v, artifact type %s", src, dst, artifactType)
72+
require.Equal(isIndex(src.MediaType), isIndex(dst.MediaType))
73+
74+
switch dst.MediaType {
75+
case ocispec.MediaTypeImageManifest, dockerspec.MediaTypeDockerSchema2Manifest:
76+
var manifest ocispec.Manifest
77+
fetchJSON(dst, &manifest)
78+
require.Equal(artifactType, manifest.ArtifactType)
79+
require.Equal(src.Digest, manifest.Subject.Digest)
80+
require.Equal(src.Size, manifest.Subject.Size)
81+
require.Equal(src.MediaType, manifest.Subject.MediaType)
82+
83+
case ocispec.MediaTypeImageIndex, dockerspec.MediaTypeDockerSchema2ManifestList:
84+
var index ocispec.Index
85+
fetchJSON(dst, &index)
86+
require.Equal(artifactType, index.ArtifactType)
87+
require.Equal(src.Digest, index.Subject.Digest)
88+
require.Equal(src.Size, index.Subject.Size)
89+
require.Equal(src.MediaType, index.Subject.MediaType)
90+
91+
var srcIndex ocispec.Index
92+
fetchJSON(src, &srcIndex)
93+
require.Equal(len(srcIndex.Manifests), len(index.Manifests))
94+
for idx := range index.Manifests {
95+
checkReferrer(srcIndex.Manifests[idx], index.Manifests[idx], artifactType)
96+
}
97+
}
98+
}
99+
100+
testcases := []struct {
101+
name string
102+
reference string
103+
}{
104+
{
105+
name: "simple",
106+
reference: TestRepository + ":amd64",
107+
},
108+
{
109+
name: "index",
110+
reference: TestRepository + ":multi-arch",
111+
},
112+
{
113+
name: "nested index",
114+
reference: TestRepository + ":nested-index",
115+
},
116+
}
117+
118+
for _, tc := range testcases {
119+
t.Run(tc.name, func(t *testing.T) {
120+
err := convert(ctx, tc.reference)
121+
require.Nil(err, err)
122+
123+
src, err := repo.Resolve(ctx, tc.reference)
124+
require.Nil(err, err)
125+
126+
obd, err := repo.Resolve(ctx, tc.reference+"_overlaybd")
127+
require.Nil(err, err)
128+
129+
turbo, err := repo.Resolve(ctx, tc.reference+"_turbo")
130+
require.Nil(err, err)
131+
132+
checkReferrer(src, obd, ArtifactTypeOverlaybd)
133+
checkReferrer(src, turbo, ArtifactTypeTurboOCI)
134+
})
135+
}
136+
}
137+
138+
const convertBin = "/opt/overlaybd/snapshotter/convertor"
139+
140+
func convert(ctx context.Context, refspec string) error {
141+
ref, err := registry.ParseReference(refspec)
142+
if err != nil {
143+
return err
144+
}
145+
cmd := exec.CommandContext(ctx, convertBin,
146+
"-r", fmt.Sprintf("%s/%s", ref.Registry, ref.Repository),
147+
"-i", ref.Reference,
148+
"--overlaybd", ref.Reference+"_overlaybd",
149+
"--turboOCI", ref.Reference+"_turbo",
150+
"--referrer",
151+
)
152+
if out, err := cmd.CombinedOutput(); err != nil {
153+
return fmt.Errorf("failed to convert: %w, output: %s", err, out)
154+
}
155+
return nil
156+
}
157+
158+
func copyImageToRegistry(ctx context.Context) error {
159+
_, filename, _, _ := runtime.Caller(0)
160+
local, err := oci.New(filepath.Join(filepath.Dir(filename), "..", "resources", "store", "hello-world"))
161+
if err != nil {
162+
return err
163+
}
164+
repo, err := remote.NewRepository(TestRepository)
165+
if err != nil {
166+
return err
167+
}
168+
169+
images := []string{"amd64", "arm64", "multi-arch", "nested-index"}
170+
for _, img := range images {
171+
src := img
172+
dst := TestRepository + ":" + img
173+
if _, err := oras.Copy(ctx, local, src, repo, dst, oras.CopyOptions{}); err != nil {
174+
return err
175+
}
176+
}
177+
return nil
178+
}
179+
180+
func isIndex(mediaType string) bool {
181+
return mediaType == ocispec.MediaTypeImageIndex || mediaType == dockerspec.MediaTypeDockerSchema2ManifestList
182+
}

ci/e2e/go.mod

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module github.com/containerd/accelerated-container-image/ci/e2e
2+
3+
go 1.22.2
4+
5+
require (
6+
github.com/containerd/containerd/v2 v2.0.0-rc.3
7+
github.com/opencontainers/image-spec v1.1.0
8+
github.com/stretchr/testify v1.9.0
9+
oras.land/oras-go/v2 v2.5.0
10+
)
11+
12+
require (
13+
github.com/containerd/errdefs v0.1.0 // indirect
14+
github.com/containerd/log v0.1.0 // indirect
15+
github.com/containerd/platforms v0.2.1 // indirect
16+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
17+
github.com/klauspost/compress v1.17.8 // indirect
18+
github.com/opencontainers/go-digest v1.0.0 // indirect
19+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
20+
github.com/sirupsen/logrus v1.9.3 // indirect
21+
golang.org/x/sync v0.7.0 // indirect
22+
golang.org/x/sys v0.21.0 // indirect
23+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
24+
google.golang.org/grpc v1.63.2 // indirect
25+
google.golang.org/protobuf v1.34.1 // indirect
26+
gopkg.in/yaml.v3 v3.0.1 // indirect
27+
)

ci/e2e/go.sum

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
github.com/containerd/containerd/v2 v2.0.0-rc.3 h1:rRISeKYnunLx8Byw8FQ/a62mTMtcr6ESGptS4+MwLaQ=
2+
github.com/containerd/containerd/v2 v2.0.0-rc.3/go.mod h1:UBHR1DgWRQcEOINFkR94m0VC0MgKd3qg9LVPnudv9vs=
3+
github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM=
4+
github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0=
5+
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
6+
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
7+
github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A=
8+
github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw=
9+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
10+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
11+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
12+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
13+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
14+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
15+
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
16+
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
17+
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
18+
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
19+
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
20+
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
21+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
22+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
23+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
24+
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
25+
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
26+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
27+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
28+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
29+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
30+
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
31+
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
32+
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
33+
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
34+
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
35+
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
36+
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
37+
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
38+
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
39+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A=
40+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
41+
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
42+
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
43+
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
44+
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
45+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
46+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
47+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
48+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
49+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
50+
oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c=
51+
oras.land/oras-go/v2 v2.5.0/go.mod h1:z4eisnLP530vwIOUOJeBIj0aGI0L1C3d53atvCBqZHg=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"schemaVersion": 2,
3+
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
4+
"config": {
5+
"mediaType": "application/vnd.docker.container.image.v1+json",
6+
"size": 1468,
7+
"digest": "sha256:a8117b42328be6ba54c594f9f14e216db10203deb22cc28aaa2c134f9ae2e0fd"
8+
},
9+
"layers": [
10+
{
11+
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
12+
"size": 2716,
13+
"digest": "sha256:630da353b594c9ca52c67727920737dba3e5aaa4fbe20cdd0fc70c0591b7a639"
14+
}
15+
]
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"schemaVersion": 2,
3+
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
4+
"config": {
5+
"mediaType": "application/vnd.docker.container.image.v1+json",
6+
"size": 1473,
7+
"digest": "sha256:e4728a982b0acd74e810aeb5e8a5c1bd87f0de7ed93a678d58b3a79e6f7da2e9"
8+
},
9+
"layers": [
10+
{
11+
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
12+
"size": 4065,
13+
"digest": "sha256:4bf3d0e19af8069cca924c84fccd58558900bd382ffbde49778906172aa135fb"
14+
}
15+
]
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"schemaVersion": 2,
3+
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
4+
"config": {
5+
"mediaType": "application/vnd.docker.container.image.v1+json",
6+
"size": 1483,
7+
"digest": "sha256:de23d9589845285bb62b33da594c4a19802fda5b09bb6aef4d00e5e8c747a8df"
8+
},
9+
"layers": [
10+
{
11+
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
12+
"size": 3658,
13+
"digest": "sha256:337a0e31c52265fdbab8ffb4f8922b73f2ea3689cf9970150afee8a5a026db30"
14+
}
15+
]
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"architecture":"arm","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:b428cee5a856e0a27a68a92fdc79e07ce0e679444984d60dc60d09da91d3b256","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"a1cc96094ddc296dcc3e123f4153239d280bb09ade31fdbd6e430d19e9b48d76","container_config":{"Hostname":"a1cc96094ddc","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:b428cee5a856e0a27a68a92fdc79e07ce0e679444984d60dc60d09da91d3b256","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2023-05-04T11:46:35.356328888Z","docker_version":"20.10.23","history":[{"created":"2023-05-04T11:46:35.27781596Z","created_by":"/bin/sh -c #(nop) COPY file:bf40f70af9a56eec54a66883a31493ea31545ec09ad150c432566b5e24b0528c in / "},{"created":"2023-05-04T11:46:35.356328888Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:c8d6fe9d9f8fb6ab6e0d701141d358a8bc40b1d5c46cbdc6fd445371c895b1f6"]},"variant":"v7"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"architecture":"ppc64le","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:d10f62162101fe360d2292f3163e7d4d07c9bd3a4bbba4a48a4bdccfa622cd5d","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"bf5c33b539ecc0a88ba3448ed5d95fdc587a6fb295347fc31a296286a419aea6","container_config":{"Hostname":"bf5c33b539ec","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:d10f62162101fe360d2292f3163e7d4d07c9bd3a4bbba4a48a4bdccfa622cd5d","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2023-05-04T23:35:14.791724762Z","docker_version":"20.10.23","history":[{"created":"2023-05-04T23:35:14.47386416Z","created_by":"/bin/sh -c #(nop) COPY file:d983edb4c32b67abbd6c309cebc3bf9ace8e1c065505fe8ae03686b5a75a5552 in / "},{"created":"2023-05-04T23:35:14.791724762Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:ac1bc0996cc2106a1e725a10fac1236fb365304b85257f0b82ab950db3bd8880"]}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"schemaVersion": 2,
3+
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
4+
"config": {
5+
"mediaType": "application/vnd.docker.container.image.v1+json",
6+
"size": 1470,
7+
"digest": "sha256:d549b3d1a2550a5e42a3f3250ce9fa4aa882b25f8528fd2eea1b789ce136631b"
8+
},
9+
"layers": [
10+
{
11+
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
12+
"size": 3265,
13+
"digest": "sha256:d898e3d98788d70a8f874f818177c11569c5bb3c818ef45b877e7bba29a3bf7f"
14+
}
15+
]
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"manifests":[{"digest":"sha256:7e9b6e7ba2842c91cf49f3e214d04a7a496f8214356f41d81a6e6dcad11f11e3","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"amd64","os":"linux"},"size":525},{"digest":"sha256:084c3bdd1271adc754e2c5f6ba7046f1a2c099597dbd9643592fa8eb99981402","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v5"},"size":525},{"digest":"sha256:a0a386314d69d1514d7aa63d12532b284bf37bba15ed7b4fc1a3f86605f86c63","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v7"},"size":525},{"digest":"sha256:efebf0f7aee69450f99deafe11121afa720abed733943e50581a9dc7540689c8","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm64","os":"linux","variant":"v8"},"size":525},{"digest":"sha256:004d23c66201b22fce069b7505756f17088de7889c83891e9bc69d749fa3690e","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"386","os":"linux"},"size":525},{"digest":"sha256:06bca41ba617acf0b3644df05d0d9c2d2f82ccaab629c0e39792b24682970040","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"mips64le","os":"linux"},"size":525},{"digest":"sha256:fbe0ff1e7697da39d987a975c737a7d2fa40b6e7f7f40c00b1dcc387b9ac0e85","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"ppc64le","os":"linux"},"size":525},{"digest":"sha256:72ba79e34f1baa40cd4d9ecd684b8389d0a1e18cf6e6d5c44c19716d25f65e20","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"riscv64","os":"linux"},"size":525},{"digest":"sha256:574efe68740d3bee2ef780036aee2e2da5cf7097ac06513f9f01f41e03365399","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"s390x","os":"linux"},"size":525}],"mediaType":"application\/vnd.docker.distribution.manifest.list.v2+json","schemaVersion":2}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"schemaVersion": 2,
3+
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
4+
"config": {
5+
"mediaType": "application/vnd.docker.container.image.v1+json",
6+
"size": 1472,
7+
"digest": "sha256:eb6f80695a28848498afd1eb4f9e12caeeae15f3ea5f39e1427c828f8fb38e5f"
8+
},
9+
"layers": [
10+
{
11+
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
12+
"size": 2976,
13+
"digest": "sha256:b102dd09f2b38103852530d8d5288ceb6779bcf33b4a453c10ac4d79fb083651"
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)