I encountered this problem when building a Docker image for another architecture. Here is a simple reproducer on a arm64 system:
``` id=$(docker create moby/buildkit:v0.34.1) docker cp "$id":/usr/bin/buildkit-qemu-x86_64 ./qemu && docker rm "$id" docker run --rm --platform linux/amd64 -v "$PWD/qemu:/qemu:ro" --entrypoint /qemu \ ubuntu:26.04 /bin/sh -c 'printf "#!/usr/bin/env sh\necho ok\n" >/t; chmod +x /t; /t' ``` On an amd64 host, use buildkit-qemu-aarch64 with --platform linux/arm64 instead. ubuntu:26.04 under BuildKit QEMU -> Security violation: Requested utility 'env' does not match executable name ubuntu:24.04 under BuildKit QEMU -> ok ubuntu:26.04 native -> ok -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2171960 Title: require-utility patch breaks env-shebang scripts in VMs To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2171960/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
