mirror of
https://github.com/moby/buildkit.git
synced 2026-07-01 12:17:54 +00:00
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>
25 lines
563 B
Bash
Executable File
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
|