genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.88k stars 229 forks source link

How to use non-native backends #333

Open baszalmstra opened 3 years ago

baszalmstra commented 3 years ago

As far as I understand the native backend is much slower than the other two available backends. Im trying to figure out how to use them though. My end-goal would be to be able to use faster snapshotting in a Kubernetes container. However, Im already unable to do this locally.

Running the example from the readme, while forcing overlayfs doesn't seem to work:

docker run --rm -it --name img --privileged --volume $(pwd):/home/user/src:ro --workdir /home/user/src --volume "${HOME}/.docker:/root/.docker:ro" --security-opt seccomp=unconfined --security-opt apparmor=unconfined r.j3ss.co/img build -t user/myimage . --debug -b overlayfs

It results in:

Error: failed to solve: failed to mount /run/user/1000/containerd-mount679459305: invalid argument

after pulling an image.

Could you clarify how to use the different backends?

(Im running Docker Engine - Community version 20.10.3)