Update https_server demo with copy_bom tool
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
This commit is contained in:
parent
cbb326e3fd
commit
1f1fd9102b
16
demos/https_server/https.yaml
Normal file
16
demos/https_server/https.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
includes:
|
||||
- base.yaml
|
||||
# https_server
|
||||
targets:
|
||||
# copy bin
|
||||
- target: /bin
|
||||
copy:
|
||||
- files:
|
||||
- ../mongoose_src/examples/simplest_web_server_ssl/$https_server
|
||||
# copy keys
|
||||
- target: /
|
||||
copy:
|
||||
- files:
|
||||
- ../mongoose_src/examples/simplest_web_server_ssl/server.key
|
||||
- ../mongoose_src/examples/simplest_web_server_ssl/server.pem
|
||||
|
@ -1,7 +1,10 @@
|
||||
#!/bin/bash
|
||||
https_server=simplest_web_server_ssl
|
||||
export https_server=simplest_web_server_ssl
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
bomfile=${SCRIPT_DIR}/https.yaml
|
||||
|
||||
# 1. Init Occlum Workspace
|
||||
rm -rf occlum_workspace
|
||||
mkdir occlum_workspace
|
||||
@ -9,10 +12,9 @@ cd occlum_workspace
|
||||
occlum init
|
||||
|
||||
# 2. Copy files into Occlum Workspace and Build
|
||||
cp ../mongoose_src/examples/simplest_web_server_ssl/$https_server image/bin
|
||||
cp -r ../mongoose_src/examples/simplest_web_server_ssl/server.* image
|
||||
cp /usr/local/occlum/x86_64-linux-musl/lib/libssl.so.1.1 image/lib
|
||||
cp /usr/local/occlum/x86_64-linux-musl/lib/libcrypto.so.1.1 image/lib
|
||||
rm -rf image
|
||||
copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template
|
||||
|
||||
occlum build
|
||||
|
||||
# 3. Run https_server
|
||||
|
Loading…
Reference in New Issue
Block a user