Update enclave_tls demo with bom file

This commit is contained in:
zongmin.gu 2021-09-26 13:47:28 +08:00 committed by Zongmin.Gu
parent 59988f9491
commit 4a91c11f9f
2 changed files with 13 additions and 6 deletions

@ -0,0 +1,11 @@
includes:
- base.yaml
targets:
- target: /bin
copy:
- files:
- /usr/share/enclave-tls/samples/enclave-tls-server
- target: /opt/enclave-tls
copy:
- dirs:
- /opt/enclave-tls/lib

@ -8,12 +8,8 @@ cd occlum_workspace
occlum init
# 2. Copy files into Occlum Workspace and Build
cp -f /usr/share/enclave-tls/samples/enclave-tls-server image/bin
cp -f /opt/occlum/glibc/lib/libdl.so.2 image/opt/occlum/glibc/lib
cp -f /usr/lib/x86_64-linux-gnu/libssl.so.1.1 image/opt/occlum/glibc/lib
cp -f /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 image/opt/occlum/glibc/lib
mkdir -p image/opt/enclave-tls
cp -rf /opt/enclave-tls/lib image/opt/enclave-tls
rm -rf image && \
copy_bom -f ../enclave_tls.yaml --root image --include-dir /opt/occlum/etc/template && \
occlum build
# 3. Run enclave_tls_server