mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-19 16:38:00 +00:00
Merge pull request #4558 from fidencio/topic/cc-build-rootfs-image-with-the-needed-tools
CC | Build the rootfs image with skopeo, umoci, and using an offline_fs_kbc
This commit is contained in:
commit
3a655c4198
@ -48,10 +48,6 @@ build_image() {
|
|||||||
info "Build image"
|
info "Build image"
|
||||||
info "image os: $img_distro"
|
info "image os: $img_distro"
|
||||||
info "image os version: $img_os_version"
|
info "image os version: $img_os_version"
|
||||||
# CCv0 on image is currently unsupported, do not pass
|
|
||||||
unset SKOPEO
|
|
||||||
unset UMOCI
|
|
||||||
unset AA_KBC
|
|
||||||
sudo -E PATH="${PATH}" make image \
|
sudo -E PATH="${PATH}" make image \
|
||||||
DISTRO="${img_distro}" \
|
DISTRO="${img_distro}" \
|
||||||
DEBUG="${DEBUG:-}" \
|
DEBUG="${DEBUG:-}" \
|
||||||
|
@ -69,3 +69,6 @@ install-tarball:
|
|||||||
|
|
||||||
image: kata-tarball
|
image: kata-tarball
|
||||||
$(MK_DIR)kata-deploy-build-and-upload-image.sh $(CURDIR)/kata-static.tar.xz
|
$(MK_DIR)kata-deploy-build-and-upload-image.sh $(CURDIR)/kata-static.tar.xz
|
||||||
|
|
||||||
|
cc-rootfs-image-tarball:
|
||||||
|
${MAKE} $@-build
|
||||||
|
@ -30,6 +30,8 @@ readonly virtiofsd_builder="${static_build_dir}/virtiofsd/build-static-virtiofsd
|
|||||||
|
|
||||||
readonly rootfs_builder="${repo_root_dir}/tools/packaging/guest-image/build_image.sh"
|
readonly rootfs_builder="${repo_root_dir}/tools/packaging/guest-image/build_image.sh"
|
||||||
|
|
||||||
|
readonly cc_prefix="/opt/confidential-containers"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
workdir="${WORKDIR:-$PWD}"
|
workdir="${WORKDIR:-$PWD}"
|
||||||
@ -83,6 +85,16 @@ EOF
|
|||||||
exit "${return_code}"
|
exit "${return_code}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Install cc capable guest image
|
||||||
|
install_cc_image() {
|
||||||
|
info "Create CC image"
|
||||||
|
export SKOPEO=yes
|
||||||
|
export UMOCI=yes
|
||||||
|
export AA_KBC="offline_fs_kbc"
|
||||||
|
|
||||||
|
"${rootfs_builder}" --imagetype=image --prefix="${cc_prefix}" --destdir="${destdir}"
|
||||||
|
}
|
||||||
|
|
||||||
#Install guest image
|
#Install guest image
|
||||||
install_image() {
|
install_image() {
|
||||||
info "Create image"
|
info "Create image"
|
||||||
@ -180,6 +192,8 @@ handle_build() {
|
|||||||
install_virtiofsd
|
install_virtiofsd
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
cc-rootfs-image) install_cc_image ;;
|
||||||
|
|
||||||
cloud-hypervisor) install_clh ;;
|
cloud-hypervisor) install_clh ;;
|
||||||
|
|
||||||
firecracker) install_firecracker ;;
|
firecracker) install_firecracker ;;
|
||||||
@ -227,6 +241,7 @@ main() {
|
|||||||
local build_targets
|
local build_targets
|
||||||
local silent
|
local silent
|
||||||
build_targets=(
|
build_targets=(
|
||||||
|
cc-rootfs-image
|
||||||
cloud-hypervisor
|
cloud-hypervisor
|
||||||
firecracker
|
firecracker
|
||||||
kernel
|
kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user