- Refer to [this guide](https://github.com/alibaba/inclavare-containers#rune) to build `rune` from scratch.
- Register a `SPID` and `Subscription Key` of [IAS](https://api.portal.trustedservices.intel.com/EPID-attestation). After the registration, Intel will respond with a SPID which is needed to communicate with IAS.
Refer to [this guide](https://github.com/alibaba/inclavare-containers/blob/master/rune/libenclave/internal/runtime/pal/skeleton/README.md#configure-oci-runtime) to configure OCI runtime in dockerd config file.
## Run stub container image with rune
```shell
docker run -it--rm--runtime=rune -eENCLAVE_TYPE=intelSgx \
In order to use `rune` you must have your container image in the format of an OCI bundle. If you have Docker installed you can use its `export` method to acquire a root filesystem from an existing stub-enclave Docker container image.
RUN ldconfig
```shell
# create the top most bundle directory
cd"$HOME/rune_workdir"
mkdir rune-container
cd rune-container
# create the rootfs directory
mkdir rootfs
# export stub-enclave image via Docker into the rootfs directory
After a root filesystem is populated you just generate a spec in the format of a config.json file inside your bundle. `rune` provides a spec command which is similar to `runc` to generate a template file that you are then able to edit.
```shell
rune spec
```
# run stub-enclave images with rune
``` shell
docker run -it--rm--runtime=rune -eENCLAVE_TYPE=intelSgx \