From e59ba66ccfdbf240e6855e5a75e370ef61414af2 Mon Sep 17 00:00:00 2001 From: "YiLin.Li" Date: Mon, 1 Jun 2020 01:35:55 +0800 Subject: [PATCH] Update RunE Quick Start doc 1. Update CentOS dockerimage to 7.5 2. Allow users to define OCCLUM_INSTANCE_DIR --- docs/rune_quick_start.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/docs/rune_quick_start.md b/docs/rune_quick_start.md index 7e4e6e09..ac5be566 100644 --- a/docs/rune_quick_start.md +++ b/docs/rune_quick_start.md @@ -1,6 +1,6 @@ # Quick Start: rune on Occlum -[Rune](https://github.com/alibaba/inclavare-containers) is a set of tools for running trusted applications in containers with the hardware-assisted enclave technology. +[rune](https://github.com/alibaba/inclavare-containers) is a set of tools for running trusted applications in containers with the hardware-assisted enclave technology. ## Hardware requirements - Install [Intel SGX driver for Linux](https://github.com/intel/linux-sgx-driver#build-and-install-the-intelr-sgx-driver), required by Intel SGX SDK && PSW. @@ -20,25 +20,30 @@ Please refer to [this guide](https://github.com/alibaba/inclavare-containers#run ``` shell yum install -y libseccomp-devel mkdir "$HOME/rune_workdir" -docker pull occlum/occlum:0.12.0-centos7.2 +docker pull occlum/occlum:0.12.0-centos7.5 docker run -it --device /dev/isgx \ -v $HOME/rune_workdir:/root/rune_workdir \ - occlum/occlum:0.12.0-centos7.2 + occlum/occlum:0.12.0-centos7.5 ``` -You can then build a hello world demo program or your product code using an [Occlum CentOS Docker image](https://hub.docker.com/r/occlum/occlum/tags). +### Prepare the materials +Before Occlum build, execute the following command to set your Occlum instance dir: +``` shell +export OCCLUM_INSTANCE_DIR=occlum-app +``` +You can build a "hello world" demo application or your own product with the [Occlum CentOS Docker image](https://hub.docker.com/r/occlum/occlum/tags). [This guide](https://github.com/occlum/occlum#hello-occlum) can help you to create your first occlum build. -### Prepare the materials -After your Occlum build, execute the following commands in Occlum sdk container environment: +After Occlum build, execute the following commands in Occlum sdk container environment: ``` shell -cp -a .occlum /root/rune_workdir +yum install -y libseccomp-devel +cp -a occlum-app /root/rune_workdir cd /root/rune_workdir mkdir lib cp /usr/lib64/libseccomp.so.2 lib -cp /usr/lib64/libprotobuf.so.8 lib +cp /usr/lib64/libprotobuf.so.* lib cp /usr/lib64/libsgx_u*.so* lib cp /usr/lib64/libsgx_enclave_common.so.1 lib cp /usr/lib64/libsgx_launch.so.1 lib @@ -50,15 +55,15 @@ Now you can build your occlum application image in the `$HOME/rune_workdir` dire Type the following commands to create a `Dockerfile`: ``` Dockerfile cat >Dockerfile <