Update grpc demo with bom file

This commit is contained in:
zongmin.gu 2021-09-26 13:21:48 +08:00 committed by Zongmin.Gu
parent c5c91baf84
commit 8a6b44a68c
4 changed files with 20 additions and 22 deletions

@ -0,0 +1,7 @@
includes:
- base.yaml
targets:
- target: /bin/
copy:
- files:
- ../greeter_client

@ -0,0 +1,7 @@
includes:
- base.yaml
targets:
- target: /bin/
copy:
- files:
- ../greeter_server

@ -23,18 +23,10 @@ then
exit 1
fi
mkdir -p image/etc
cp ../greeter_client image/bin
cp $INSTALL_DIR/lib/libprotobuf.so.3.10.0.0 image/lib
cp $INSTALL_DIR/lib/libcares.so.2 image/lib
cp $INSTALL_DIR/lib/libz.so.1 image/lib
if [ $? -ne 0 ]
then
echo "libraries copied failed"
exit 1
fi
rm -rf image && \
copy_bom -f ../grpc_client.yaml --root image --include-dir /opt/occlum/etc/template && \
occlum build
if [ $? -ne 0 ]
then
echo "occlum build failed"

@ -22,18 +22,10 @@ then
exit 1
fi
mkdir -p image/etc
cp ../greeter_server image/bin
cp $INSTALL_DIR/lib/libprotobuf.so.3.10.0.0 image/lib
cp $INSTALL_DIR/lib/libcares.so.2 image/lib
cp $INSTALL_DIR/lib/libz.so.1 image/lib
if [ $? -ne 0 ]
then
echo "libraries copied failed"
exit 1
fi
rm -rf image && \
copy_bom -f ../grpc_server.yaml --root image --include-dir /opt/occlum/etc/template && \
occlum build
if [ $? -ne 0 ]
then
echo "occlum build failed"