diff --git a/demos/golang/grpc_pingpong/ping.yaml b/demos/golang/grpc_pingpong/ping.yaml new file mode 100644 index 00000000..67418888 --- /dev/null +++ b/demos/golang/grpc_pingpong/ping.yaml @@ -0,0 +1,11 @@ +includes: + - base.yaml +targets: + - target: /bin + copy: + - files: + - ../occlum_ping + - target: /etc + copy: + - files: + - /etc/hosts diff --git a/demos/golang/grpc_pingpong/pong.yaml b/demos/golang/grpc_pingpong/pong.yaml new file mode 100644 index 00000000..8995eb93 --- /dev/null +++ b/demos/golang/grpc_pingpong/pong.yaml @@ -0,0 +1,11 @@ +includes: + - base.yaml +targets: + - target: /bin + copy: + - files: + - ../occlum_pong + - target: /etc + copy: + - files: + - /etc/hosts diff --git a/demos/golang/grpc_pingpong/run_ping_on_occlum.sh b/demos/golang/grpc_pingpong/run_ping_on_occlum.sh index f5262187..19dc0356 100755 --- a/demos/golang/grpc_pingpong/run_ping_on_occlum.sh +++ b/demos/golang/grpc_pingpong/run_ping_on_occlum.sh @@ -25,8 +25,8 @@ new_json="$(jq '.resource_limits.user_space_size = "2560MB" | echo "${new_json}" > Occlum.json # 2. Copy program into Occlum Workspace and build -cp ../occlum_ping image/bin -cp /etc/hosts image/etc/ +rm -rf image && \ +copy_bom -f ../ping.yaml --root image --include-dir /opt/occlum/etc/template && \ occlum build # 3. Run the hello world sample diff --git a/demos/golang/grpc_pingpong/run_pong_on_occlum.sh b/demos/golang/grpc_pingpong/run_pong_on_occlum.sh index 033f21b4..1e2c3bed 100755 --- a/demos/golang/grpc_pingpong/run_pong_on_occlum.sh +++ b/demos/golang/grpc_pingpong/run_pong_on_occlum.sh @@ -25,8 +25,8 @@ new_json="$(jq '.resource_limits.user_space_size = "2560MB" | echo "${new_json}" > Occlum.json # 2. Copy program into Occlum Workspace and build -cp ../occlum_pong image/bin -cp /etc/hosts image/etc/ +rm -rf image && \ +copy_bom -f ../pong.yaml --root image --include-dir /opt/occlum/etc/template && \ occlum build # 3. Run the hello world sample