Docker support in the VM #598
Replies: 4 comments
-
This is the second ask for netfilter so we will probably enable that in the kernel config.
The current v0.3 versions use host-side overlayfs implementation which has a lot of issues. We have removed that in main, in favor of image-backed OCI layers and we now use the guest-side kernel overlayfs for performance and compatibility. This should solve the filesystem issue. |
Beta Was this translation helpful? Give feedback.
-
I had to enable 50 different network related flags to make docker happy (I can provide them if you want). I like the idea from #600 of just being table to provide our own kernel.
I am actually testing with main, and the problem persists in the current version. I am not exactly sure what docker is doing there exactly. I have never seen docker creating a separate mount directly in /var/lib/docker. The mounts looks like this: Container start fails because docker wants to create an overlay where upperdir points to another overlayfs (which as far as I understand is not supported at all) As I said, this is can be easily worked around with fuse-overlayfs. But being able to have a block device as volume backed by a file in the host system might make sense. Then I could just mount that directly to /var/lib/docker. |
Beta Was this translation helpful? Give feedback.
-
Please do. I raised a PR for it already btw. Anything I'm missing? We are also making it easier to specify your own libkrunfw library. We already support setting it in the global config btw.
I see.
You are right! That's a gap and I'm fixing it right now. |
Beta Was this translation helpful? Give feedback.
-
|
I forgot to mention. Docker works on the latest version, msb run \
--memory 2G \
--entrypoint sh \
docker:dind \
-- -lc '
dockerd --data-root=/tmp/docker >/tmp/dockerd.log 2>&1 &
for i in $(seq 1 60); do
docker info >/dev/null 2>&1 && exec docker run --rm hello-world
sleep 1
done
cat /tmp/dockerd.log
exit 1
'Right now, I still have to set the docker data root to In a future release (0.4.4 probably) with proper mounted disk image, the data root will be persisted across restarts. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to use microsandbox to run local AI coding agents in an fully isolated way. Generally my tests are very promising.
Getting docker to work in the VMs itself is quite challenging though. Is this something you see as goal for this project to allow this?
Problems I have found so far:
Is this something worth following up on? Would it be possible to handle a different kernel and the block device with a plugin later?
Beta Was this translation helpful? Give feedback.
All reactions