Skip to content

Commit

Permalink
Add oc image append which adds layers to a schema1/2 image
Browse files Browse the repository at this point in the history
This command can take zero or more gzipped layer tars (in Docker layer
format) and append them to an existing image or a scratch image and then
push the new image to a registry. Layers in the existing image are
pushed as well. The caller can mutate the provided config as it goes.
  • Loading branch information
smarterclayton committed Jun 28, 2018
1 parent d35eb60 commit 1293ecd
Show file tree
Hide file tree
Showing 12 changed files with 1,383 additions and 21 deletions.
60 changes: 60 additions & 0 deletions contrib/completions/bash/oc

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

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

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

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
}
Loading

0 comments on commit 1293ecd

Please sign in to comment.