Created
January 25, 2023 02:31
-
-
Save h2onda/6992ebccd9920c045d547d002c30cf88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
buildsh=$(mktemp /tmp/buildsh.XXXXXX) | |
cat <<-EOF > $buildsh | |
buildctl-daemonless.sh build \ | |
--frontend=dockerfile.v0 \ | |
--local context=. \ | |
--local dockerfile=. \ | |
--output type=oci,name=example:latest,dest=output.tar | |
EOF | |
cat $buildsh | \ | |
docker run -i --rm --entrypoint sh \ | |
-v $(pwd):/workdir --workdir /workdir \ | |
--security-opt seccomp=unconfined \ | |
--env BUILDKITD_FLAGS="--oci-worker-no-process-sandbox" \ | |
moby/buildkit:rootless -s | |
rm $buildsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment