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

load container image from file #873

Open
milahu opened this issue Oct 9, 2021 · 4 comments
Open

load container image from file #873

milahu opened this issue Oct 9, 2021 · 4 comments

Comments

@milahu
Copy link

milahu commented Oct 9, 2021

in docker we have docker load

docker load < some-container.tar.gz
docker run some-container:latest

how does this work with ignite?

@milahu
Copy link
Author

milahu commented Oct 10, 2021

the only workaround i see, is serving the image from a local registry, and calling

sudo ignite run localhost/my-image:1.0.0

@darkowlzz
Copy link
Contributor

darkowlzz commented Oct 19, 2021

Hi, at the moment, ignite uses the container runtime's content store to import images. The default container runtime being containerd, when ignite pulls an image, the image is pulled into the containerd image store and then copied to /var/lib/firecracker/image/. Deleting an image from /var/lib/firecracker/image/ and pulling the same image, will just copy the same image from containerd image store.
In order to load image from file, the image should be loaded into the container runtime, containerd or docker, and then imported by ignite.
For containerd, you may try using ctr images import to load the image into containerd image store, similar to docker load.
Since containerd is the default image store, ignite image import will copy the image from containerd automatically.
To copy image from docker image store, ignite image import <image> --runtime docker will copy the image from docker.

When you use a local registry, it still pulls the image into the container runtime content store. If the image is already in the content store, it can be directly imported into ignite with ignite image import command.
The same kind of command for kernel image import ignite kernel import.

Hope that's helpful.

@darkowlzz
Copy link
Contributor

Looks like I did work on this feature a long time ago but didn't finish it, maybe because the image store may change to use the containerd content store directly #557.

@cron410
Copy link

cron410 commented Feb 23, 2023

Is there a way to run the VM from a squashfs or ext4 rootfs image directly as Firecracker suggests? My goal is to run container images directly beside a firecracker VM that runs a custom OpenWRT with a custom kernel that enables MPTCP. Seems like placing that custom kernel inside a docker image is not difficult.

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

No branches or pull requests

3 participants