README.md 948 字节
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 5 6
# Install runectl
Refer to this document:[runectl](https://github.com/alibaba/inclavare-containers/tree/master/runectl)

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
# Build liberpal-skeleton.so
```shell
cd "$GOPATH/src/github.com/alibaba/inclavare-containers/rune"
make all
```

# Build skeleton docker image
```shell
cd "$GOPATH/src/github.com/alibaba/inclavare-containers/rune/libenclave/internal/runtime/pal/skeleton"
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 .

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 \
  -e ENCLAVE_RUNTIME_ARGS="skeleton,debug" \
  liberpal-skeleton
```