Skip to content

Commit fec789b

Browse files
Merge pull request #20027 from smarterclayton/layer
Add `oc image append` which adds layers to a schema1/2 image
2 parents e689dd3 + 2721b3b commit fec789b

File tree

31 files changed

+2143
-778
lines changed

31 files changed

+2143
-778
lines changed

contrib/completions/bash/oc

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/completions/zsh/oc

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/man/man1/.files_generated_oc

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/man/man1/oc-image-append.1

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hack/import-restrictions.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,25 @@
148148
]
149149
},
150150

151+
{
152+
"checkedPackages": [
153+
"github.com/openshift/origin/pkg/image/apis/image/docker10"
154+
],
155+
"allowedImportPackageRoots": [],
156+
"allowedImportPackages": []
157+
},
158+
151159
{
152160
"checkedPackages": [
153161
"github.com/openshift/origin/pkg/image/apis/image",
154-
"github.com/openshift/origin/pkg/image/apis/image/docker10",
155162
"github.com/openshift/origin/pkg/image/apis/image/dockerpre012",
156163
"github.com/openshift/origin/pkg/image/apis/image/v1"
157164
],
158165
"allowedImportPackageRoots": [
159166
"vendor/k8s.io/apimachinery",
160167
"github.com/openshift/origin/pkg/image/apis/image/internal",
161168
"github.com/openshift/origin/pkg/image/apis/image/reference",
169+
"github.com/openshift/origin/pkg/image/apis/image/docker10",
162170
"vendor/k8s.io/api",
163171
"vendor/github.com/openshift/api",
164172
"github.com/openshift/origin/pkg/api/apihelpers"
@@ -484,6 +492,10 @@
484492
"github.com/openshift/origin/pkg/image/apis/image",
485493
"github.com/openshift/origin/pkg/image/apis/image/install",
486494
"github.com/openshift/origin/pkg/image/apis/image/v1/trigger",
495+
"github.com/openshift/origin/pkg/image/apis/image/docker10",
496+
"github.com/openshift/origin/pkg/image/apis/image/reference",
497+
"github.com/openshift/origin/pkg/image/dockerlayer",
498+
"github.com/openshift/origin/pkg/image/dockerlayer/add",
487499
"github.com/openshift/origin/pkg/image/importer/dockerv1client",
488500
"github.com/openshift/origin/pkg/image/registryclient",
489501
"github.com/openshift/origin/pkg/image/registryclient/dockercredentials",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package docker10
2+
3+
// Convert_DockerV1CompatibilityImage_to_DockerImageConfig takes a Docker registry digest
4+
// (schema 2.1) and converts it to the external API version of Image.
5+
func Convert_DockerV1CompatibilityImage_to_DockerImageConfig(in *DockerV1CompatibilityImage, out *DockerImageConfig) error {
6+
*out = DockerImageConfig{
7+
ID: in.ID,
8+
Parent: in.Parent,
9+
Comment: in.Comment,
10+
Created: in.Created,
11+
Container: in.Container,
12+
DockerVersion: in.DockerVersion,
13+
Author: in.Author,
14+
Architecture: in.Architecture,
15+
Size: in.Size,
16+
OS: "linux",
17+
ContainerConfig: in.ContainerConfig,
18+
}
19+
if in.Config != nil {
20+
out.Config = &DockerConfig{}
21+
*out.Config = *in.Config
22+
}
23+
return nil
24+
}

pkg/image/apis/image/docker10/doc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
// Package docker10 is the docker10 version of the API.
1+
// Package docker10 provides types used by docker/distribution and moby/moby.
2+
// This package takes no dependency on external types.
23
package docker10

pkg/image/apis/image/docker10/register.go

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)