Update dcap demo with copy_bom tool

Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
This commit is contained in:
Zheng, Qi 2021-09-26 15:31:53 +08:00 committed by Zongmin.Gu
parent 4a91c11f9f
commit 63deda28b9
2 changed files with 19 additions and 7 deletions

@ -0,0 +1,16 @@
includes:
- base.yaml
# dcap
targets:
# copy bins
- target: /bin
copy:
- files:
- ../dcap_lib/target/debug/examples/dcap_test
- ../c_app/dcap_c_test
# copy lib
- target: /opt/occlum/glibc/lib
copy:
- files:
- ../dcap_lib/target/debug/libdcap_quote.so

@ -1,6 +1,4 @@
#!/bin/bash #!/bin/bash
occlum_glibc=/opt/occlum/glibc/lib/
set -e set -e
BLUE='\033[1;34m' BLUE='\033[1;34m'
@ -15,11 +13,9 @@ make -C c_app
rm -rf ${INSTANCE_DIR} && occlum new ${INSTANCE_DIR} rm -rf ${INSTANCE_DIR} && occlum new ${INSTANCE_DIR}
cd ${INSTANCE_DIR} cd ${INSTANCE_DIR}
cp ../dcap_lib/target/debug/examples/dcap_test image/bin
cp ../dcap_lib/target/debug/libdcap_quote.so image/$occlum_glibc rm -rf image
cp ../c_app/dcap_c_test image/bin copy_bom -f ../dcap.yaml --root image --include-dir /opt/occlum/etc/template
cp $occlum_glibc/libdl.so.2 image/$occlum_glibc
cp $occlum_glibc/librt.so.1 image/$occlum_glibc
occlum build occlum build