Open tbeadle opened 5 years ago
I was not aware that this can be set in config. Buildkit does not use docker API for execution but containerd/runc directly (and their security profile). I don't think allowing to set this kind of thing in builder is a good idea as it makes Dockerfiles unportable, we are in process of adding #570 with a more portable solution. Even the daemon level options were not probably added with this use case in mind.
I would think we would never add this to buildkit itself but we should probably still add it in moby integration to keep the compatibility.
I am running docker with a modified seccomp profile that whitelists unshare, mount, umount, and umount2. If I try to build an image with buildkit with a Dockerfile that uses
unshare
in a RUN line, the image fails to build. If DOCKER_BUILDKIT is unset, then it builds successfully.The seccomp profile that I using is the same as the default one (from https://raw.githubusercontent.com/moby/moby/master/profiles/seccomp/default.json) except with the following changes to whitelist unshare, mount, umount, and umount2: