-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·18 lines (16 loc) · 770 Bytes
/
build.sh
File metadata and controls
executable file
·18 lines (16 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -x
# https://docs.docker.com/build/builders/drivers/docker-container/#custom-network
docker network create --subnet 10.0.2.0/24 --ip-range 10.0.2.16/28 --gateway 10.0.2.1 docker-archive-bridge
docker buildx create --driver-opt "network=docker-archive-bridge" --name docker-archive-builder \
--buildkitd-flags "--allow-insecure-entitlement security.insecure"
docker buildx --builder docker-archive-builder prune --filter type=exec.cachemount -f || true
mkdir -p modules
cp /lib/modules/$(uname -r) modules/$(uname -r) -r
docker buildx build \
--build-arg CACHE_BUST=$(date +%s) \
--build-arg BUILDKIT_SANDBOX_HOSTNAME=kubernetes-1-29-0 \
--builder docker-archive-builder \
--allow security.insecure \
--load -t $1 .
rm modules -r