Files
buildkit/hack/shell
Tonis Tiigi d4cd0194d8 add CNI bridge network provider
This adds a new network configuration based on CNI bridge.
Unlike the existing CNI provider this does not require
user to provide CNI configuration and plugins externally.

The minimal set of plugins required to use the network mode
is provided together with buildkit. Currently, bridge
mode is opt-in but intention is to make it default after
a testing period of one release cycle.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-01-09 18:06:14 -08:00

25 lines
563 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 --build-arg BUILDKIT_DEBUG --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
volumes=
if [ -n "$MOUNT_BUILDKIT_SOURCE" ]; then
volumes="-v $(pwd):/src"
fi
set -x
docker run $SSH $volumes -it --privileged -v /tmp -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $(cat $iidfile) ash