c2w CLI does not work on Container Environments
Trying to run c2w on a Cloud IDE utilising either a Firecracker VM or Docker in its backend results in c2w not working because it tries to mount /rootfs/dev/null which is not permitted by the environment.
This is replicable using Gitpod or CSB.
Thanks for posting that issue. Currently that file is created during image conversion but yes, that won't work in some environment and that should be created during runtime.
I tried something here https://github.com/microchipgnu/container4container2wasm
Take a look and let me know if this makes sense.
It worked for me, but looking for ways to improve it.
- https://github.com/microchipgnu/container4container2wasm/blob/ccd1789f0f474b9209158e8fa9c3e42695247409/docker_entrypoint.sh#L57-L83
DOCKER="docker"
DOCKER="podman"
DOCKER="podman-remote"
DOCKER="nerdctl"
DOCKER_BUILD="docker buildx"
DOCKER_BUILD="nerdctl build" # buildx
DOCKER_BUILD="podman build"
Though probably just docker buildx and maybe nerdctl build work?
- podman is one alternative to the docker provisioning steps in run_conversion.sh: https://github.com/microchipgnu/container4container2wasm/blob/main/run_conversion.sh