mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 17:18:11 +00:00
15 lines
558 B
Bash
Executable File
15 lines
558 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
function clean() {
|
|
docker rmi $(cat $iidfile)
|
|
}
|
|
iidfile=$(mktemp -t docker-iidfile.XXXXXXXXXX)
|
|
DOCKER_BUILDKIT=1 docker build --iidfile $iidfile --target dev-env .
|
|
#DOCKER_BUILDKIT=1 docker build --iidfile $iidfile -f ./hack/dockerfiles/test.buildkit.Dockerfile --target dev-env .
|
|
trap clean EXIT
|
|
SSH=
|
|
if [ -n "$MOUNT_SSH_AUTH_SOCK" ]; then
|
|
SSH="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK"
|
|
fi
|
|
docker run $SSH -it --privileged -v /tmp --net=host --rm -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry $(cat $iidfile)
|