-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·23 lines (19 loc) · 926 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
source .env-build
docker build -f Dockerfile --rm --network host -t magnum-kubernetes:latest .
imagedir=`pwd`/image
mkdir -p $imagedir
chmod 666 $imagedir
docker run --rm --privileged --network host -v $imagedir:/image magnum-kubernetes \
sh -c 'export DIB_KUBERNETES_VERSION="'$DIB_KUBERNETES_VERSION'" && \
export DIB_RELEASE="'$DISTR'" && \
export DIB_CNI_PLUGINS_VERSION="'$DIB_CNI_PLUGINS_VERSION'" && \
export DIB_CONTAINERD_VERSION="'$DIB_CONTAINERD_VERSION'" && \
export DIB_CRI_TOOLS_VERSION="'$DIB_CRI_TOOLS_VERSION'" && \
export DIB_RUNC_VERSION="'$DIB_RUNC_VERSION'" && \
export DIB_CILIUM_TAG="'$DIB_CILIUM_TAG'" && \
export DIB_CALICO_TAG="'$DIB_CALICO_TAG'" && \
disk-image-create -x -t qcow2 \
--no-tmpfs \
-o /image/k8s-v$DIB_KUBERNETES_VERSION-$DIB_RELEASE.qcow2 \
-n block-device-efi vm ubuntu kubernetes qemu-ga allow-root prepull-images'