Skip to content

Commit

Permalink
Merge pull request #20027 from smarterclayton/layer
Browse files Browse the repository at this point in the history
Add `oc image append` which adds layers to a schema1/2 image
  • Loading branch information
openshift-merge-robot authored Jul 13, 2018
2 parents e689dd3 + 2721b3b commit fec789b
Show file tree
Hide file tree
Showing 31 changed files with 2,143 additions and 778 deletions.
66 changes: 66 additions & 0 deletions contrib/completions/bash/oc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions contrib/completions/zsh/oc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/man/man1/.files_generated_oc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/man/man1/oc-image-append.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion hack/import-restrictions.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,25 @@
]
},

{
"checkedPackages": [
"github.com/openshift/origin/pkg/image/apis/image/docker10"
],
"allowedImportPackageRoots": [],
"allowedImportPackages": []
},

{
"checkedPackages": [
"github.com/openshift/origin/pkg/image/apis/image",
"github.com/openshift/origin/pkg/image/apis/image/docker10",
"github.com/openshift/origin/pkg/image/apis/image/dockerpre012",
"github.com/openshift/origin/pkg/image/apis/image/v1"
],
"allowedImportPackageRoots": [
"vendor/k8s.io/apimachinery",
"github.com/openshift/origin/pkg/image/apis/image/internal",
"github.com/openshift/origin/pkg/image/apis/image/reference",
"github.com/openshift/origin/pkg/image/apis/image/docker10",
"vendor/k8s.io/api",
"vendor/github.com/openshift/api",
"github.com/openshift/origin/pkg/api/apihelpers"
Expand Down Expand Up @@ -484,6 +492,10 @@
"github.com/openshift/origin/pkg/image/apis/image",
"github.com/openshift/origin/pkg/image/apis/image/install",
"github.com/openshift/origin/pkg/image/apis/image/v1/trigger",
"github.com/openshift/origin/pkg/image/apis/image/docker10",
"github.com/openshift/origin/pkg/image/apis/image/reference",
"github.com/openshift/origin/pkg/image/dockerlayer",
"github.com/openshift/origin/pkg/image/dockerlayer/add",
"github.com/openshift/origin/pkg/image/importer/dockerv1client",
"github.com/openshift/origin/pkg/image/registryclient",
"github.com/openshift/origin/pkg/image/registryclient/dockercredentials",
Expand Down
24 changes: 24 additions & 0 deletions pkg/image/apis/image/docker10/conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package docker10

// Convert_DockerV1CompatibilityImage_to_DockerImageConfig takes a Docker registry digest
// (schema 2.1) and converts it to the external API version of Image.
func Convert_DockerV1CompatibilityImage_to_DockerImageConfig(in *DockerV1CompatibilityImage, out *DockerImageConfig) error {
*out = DockerImageConfig{
ID: in.ID,
Parent: in.Parent,
Comment: in.Comment,
Created: in.Created,
Container: in.Container,
DockerVersion: in.DockerVersion,
Author: in.Author,
Architecture: in.Architecture,
Size: in.Size,
OS: "linux",
ContainerConfig: in.ContainerConfig,
}
if in.Config != nil {
out.Config = &DockerConfig{}
*out.Config = *in.Config
}
return nil
}
3 changes: 2 additions & 1 deletion pkg/image/apis/image/docker10/doc.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// Package docker10 is the docker10 version of the API.
// Package docker10 provides types used by docker/distribution and moby/moby.
// This package takes no dependency on external types.
package docker10
23 changes: 0 additions & 23 deletions pkg/image/apis/image/docker10/register.go

This file was deleted.

Loading

0 comments on commit fec789b

Please sign in to comment.