From 6e5e4e55d0b447bcc14f9583b3a49239a75d677e Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Thu, 29 Feb 2024 22:45:36 +0800 Subject: [PATCH] rootfs: add ca file to guest rootfs To access the URL, the component to pull image in the guest needs to send a request to the remote. Therefore, we need to add CA to the rootfs. Signed-off-by: ChengyuZhu6 --- tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh index 6ca31c1c63..0f4c3e792b 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh +++ b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh @@ -47,6 +47,10 @@ EOF ln -s /run "$rootfs_dir/var/run" cp --remove-destination /etc/resolv.conf "$rootfs_dir/etc" + local dir="$rootfs_dir/etc/ssl/certs" + mkdir -p "$dir" + cp --remove-destination /etc/ssl/certs/ca-certificates.crt "$dir" + # Reduce image size and memory footprint by removing unnecessary files and directories. rm -rf $rootfs_dir/usr/share/{bash-completion,bug,doc,info,lintian,locale,man,menu,misc,pixmaps,terminfo,zsh}