-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy to docker-daemon overlay2 storage #2265
Comments
Thanks for reaching out. That feature doesn’t exist, and I don’t think it can be reasonably supported. Docker’s image storage is, presumably, an internal implementation detail of Docker; so, running |
thanks @mtrmac for clearing that up. I'm struggling to build a customised raspberry pi image with some preloaded docker images already loaded. I wanted to avoid exporting to tar files and running |
A friendly reminder that this issue had no activity for 30 days. |
I'm doing something similar on GitHub Actions for CI builds of custom Raspberry Pi SD card images, but I haven't found an ideal solution yet either. The approach I took was to:
Using Docker to load container images from pre-downloaded tarballs and instantiate containers from them in a booted QEMU VM takes a painfully long amount of time (~30-40 minutes per CI workflow run, with ~20 min of that spent on loading tarballs into the daemon and the rest on instantiating images into containers) when I have ~10-15 container images to load and several of those images are large (~100 MB each for ~5 images); it's much slower than loading images on my real Raspberry Pi with a decent SD card, but it allows me to achieve a first-boot duration of ~45 sec, with ~25 sec of that spent on doing Docker-related stuff (~10 sec on starting containerd.service + docker.service, and ~15 sec doing I'm hoping that once GitHub Actions makes their ARM-hosted runners generally available beyond beta (and hopefully free to use), it might be feasible to run the Docker daemon in an unbooted systemd-nspawn container instead of a booted QEMU VM, and that doing so might be significantly faster. |
Update: I've found a pretty nice workaround, which is to preload container images into containerd instead of Docker. I can do this using The caveat to make this work is that you must enable an experimental Docker setting to use the containerd image store so that Docker will use the images loaded into containerd - but if you're willing to do that, you can preload your container images before first boot in a relatively tolerable amount of time. |
@ethanjli this is a nice solution! Thx |
Is there a way to copy an image to the overlay2 storage that docker daemon uses without running the docker daemon? I'd like to just specify a path on the filesystem where the overlay2 storage is.
I'm running in an environment where I cannot run docker daemon but I need to load the images into the overlay2 storage so when docker daemon is started it has those images preloaded
The text was updated successfully, but these errors were encountered: