README.md 990 字节
Newer Older
1 2 3
The files in this directory are used to implement a skeleton enclave runtime,
in order to help to write your own enclave runtime.

4
# Install runectl
5
Refer to [this guide](https://github.com/alibaba/inclavare-containers/tree/master/runectl)
6

7 8
# Build liberpal-skeleton.so
```shell
9 10
cd "${path_to_inclavare_containers}/rune/libenclave/internal/runtime/pal/skeleton"
make
11 12 13 14
```

# Build skeleton docker image
```shell
15
cd "${path_to_inclavare_containers}/rune/libenclave/internal/runtime/pal/skeleton"
16 17 18 19 20 21 22 23
cat >Dockerfile <<EOF
FROM centos:7.2.1511

RUN mkdir -p /run/rune
WORKDIR /run/rune

RUN yum install -y libseccomp-devel
COPY liberpal-skeleton.so .
24 25 26 27
COPY encl.bin .
COPY encl.elf .
COPY encl.ss .
COPY encl.token .
28 29 30 31 32 33 34 35 36 37 38

RUN ldconfig
EOF
docker build . -t liberpal-skeleton
```

# Run skeleton docker image
```shell
docker run -it --rm --runtime=rune \
  -e ENCLAVE_TYPE=intelSgx \
  -e ENCLAVE_RUNTIME_PATH=/run/rune/liberpal-skeleton.so \
39
  -e ENCLAVE_RUNTIME_ARGS="debug" \
40 41
  liberpal-skeleton
```