README.md 1.1 KB
Newer Older
1 2
# Configure SGX RA settings
``` shell
jia zhang's avatar
jia zhang 已提交
3 4 5 6 7
export SPID=<hex string>
export EPID_SUBSCRIPTION_KEY=<hex string>
export QUOTE_TYPE=<SGX_LINKABLE_SIGNATURE | SGX_UNLINKABLE_SIGNATURE>
```

8 9 10 11 12
# Build Stub Enclave
``` shell
cd "${path_to_inclavare_containers}/stub-enclave"
make
sudo make install
13 14
```

15 16 17 18 19 20 21 22 23
# Build Docker images
## Prepare the materials
``` shell
mkdir lib
cp /usr/lib/x86_64-linux-gnu/libsgx_urts.so lib
cp /usr/lib/x86_64-linux-gnu/libsgx_uae_service.so lib
cp /usr/lib/x86_64-linux-gnu/libsgx_enclave_common.so.1 lib
cp /usr/lib/x86_64-linux-gnu/libprotobuf.so.10 lib
cp /lib/x86_64-linux-gnu/libseccomp.so.2 lib
24 25
```

26 27
## Dockerfile
``` shell
28 29
FROM ubuntu:18.04
  
jia zhang's avatar
jia zhang 已提交
30
RUN mkdir -p /run/rune/stub-enclave
31 32
WORKDIR /run/rune

33 34
COPY lib                        /lib
COPY liberpal-stub.so         .
jia zhang's avatar
jia zhang 已提交
35
COPY Wolfssl_Enclave.signed.so  stub-enclave
36

37
RUN ldconfig
38 39
```

40 41
``` shell
docker build -t ${stub-enclave-image} .
42 43
```

44 45 46 47 48
# run stub-enclave images with rune
``` shell
docker run -it --rm --runtime=rune -e ENCLAVE_TYPE=intelSgx \
	-e ENCLAVE_RUNTIME_PATH=/lib/liberpal-stub.so \
	-e ENCLAVE_RUNTIME_ARGS=stub-enclave ${stub-enclave-image}
49
```