Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

[POC] Import images from tar file #557

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

darkowlzz
Copy link
Contributor

@darkowlzz darkowlzz commented Mar 10, 2020

Implements importing local container images from tar file. Uses a new
subcommand tarimport for now, since import command is already used
for pulling the image from image repository.
Adds a new function ImportImage() in the runtime interface and
implements them for docker and containerd runtimes. The images are first
imported into the runtime's image store and then copied to ignite's
backend store as ignite VM images.

Usage:

ignite image tarimport hello-world.tar

Tar files can be created using docker save.

tarimport is a placeholder subcommand for now. It'll be changed to something better after some feedback about the implementation.

Implements importing local container images from tar file. Uses a new
subcommand `tarimport` for now, since `import` command is already used
for pulling the image from image repository.
Adds a new function ImportImage() in the runtime interface and
implements them for docker and containerd runtimes. The images are first
imported into the runtime's image store and then copied to ignite's
backend store as ignite VM images.

Usage:

ignite image tarimport hello-world.tar
@@ -29,6 +29,10 @@ func (ds *DockerSource) Ref() meta.OCIImageRef {
return ds.imageRef
}

func (ds *DockerSource) SetRef(imageRef meta.OCIImageRef) {
ds.imageRef = imageRef
}
Copy link
Contributor Author

@darkowlzz darkowlzz Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetRef is required to use the correct imageRef in DockerSource.Reader when a single image tar file contains multiple images. DockerSource importing multiple images require this option to set the imageRef of the DockerSource when the images are read.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant