Skip to content

Commit 5e96aa9

Browse files
Update to SGX SDK v2.4
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
1 parent ffba4d4 commit 5e96aa9

File tree

4 files changed

+33
-18
lines changed

4 files changed

+33
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ deploying and running an example chaincode.
9797
* CMake 3.5.1 or higher
9898
* Go 1.11 or higher
9999
* Install Fabric v1.4 https://github.com/hyperledger/fabric
100-
* Install the Linux SGX SDK v2.1.3 https://github.com/intel/linux-sgx
100+
* Install the Linux SGX SDK v2.4 https://github.com/intel/linux-sgx
101101
* You also need to install Intel SGX SSL https://github.com/intel/intel-sgx-ssl
102102

103103
### SGX SDK and SSL

utils/fabric-ccenv-sgx/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
.PHONY: all
22

3-
all: build
3+
all: prep build
4+
5+
prep:
6+
git clone https://github.com/tozd/docker-sgx.git
7+
cd docker-sgx && ln -s ubuntu-xenial.dockerfile Dockerfile && git apply ../sgx_2.4.patch
48

59
build:
610
docker build -t hyperledger/fabric-ccenv-sgx:latest docker-sgx

utils/fabric-ccenv-sgx/README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,8 @@
22

33
Thanks tozd for providing this! https://github.com/tozd/docker-sgx
44

5-
First do this ...
6-
7-
$ git clone https://github.com/tozd/docker-sgx.git
8-
$ cd docker-sgx
9-
$ ln -s ubuntu-xenial.dockerfile Dockerfile
10-
11-
Next edit ``ubuntu-xenial.dockerfile`` and change the first line (FROM) to the
12-
fabric chaincode environment image.
13-
14-
FROM hyperledger/fabric-ccenv:latest
15-
16-
Also add ``libsystemd-dev`` to the list of packages to install in line 6.
17-
18-
Finally go back to ``fabric-ccenv-sgx`` root directory and just run `make`.
19-
20-
Now you should see ``hyperledger/fabric-ccenv-sgx`` in the list of docker images.
5+
Run `make` and build the chaincode environment base image with SGX support.
6+
You should now see ``hyperledger/fabric-ccenv-sgx`` in the list of docker images.
217

228
$ docker images
239

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/ubuntu-xenial.dockerfile b/ubuntu-xenial.dockerfile
2+
index dca51eb..697d4cb 100644
3+
--- a/ubuntu-xenial.dockerfile
4+
+++ b/ubuntu-xenial.dockerfile
5+
@@ -1,9 +1,9 @@
6+
-FROM tozd/runit:ubuntu-xenial
7+
+FROM hyperledger/fabric-ccenv:latest
8+
9+
COPY ./patches /patches
10+
11+
RUN apt-get update -q -q && \
12+
- apt-get install wget python git patch build-essential ocaml automake autoconf libtool libssl-dev libcurl4-openssl-dev protobuf-compiler protobuf-c-compiler libprotobuf-dev libprotobuf-c0-dev alien uuid-dev libxml2-dev cmake pkg-config --yes --force-yes && \
13+
+ apt-get install wget python git patch build-essential ocaml automake autoconf libtool libssl-dev libcurl4-openssl-dev protobuf-compiler protobuf-c-compiler libprotobuf-dev libprotobuf-c0-dev alien uuid-dev libxml2-dev cmake pkg-config libsystemd-dev --yes --force-yes && \
14+
mkdir -p /tmp/icls && \
15+
cd /tmp/icls && \
16+
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11414/iclsClient-1.45.449.12-1.x86_64.rpm && \
17+
@@ -18,7 +18,7 @@ RUN apt-get update -q -q && \
18+
make install && \
19+
rm -rf /tmp/dynamic-application-loader-host-interface && \
20+
cd /tmp && \
21+
- git clone https://github.com/01org/linux-sgx.git && \
22+
+ git clone -b sgx_2.4 https://github.com/01org/linux-sgx.git && \
23+
cd / && \
24+
for patch in /patches/*; do patch --prefix=/patches/ -p0 --force "--input=$patch" || exit 1; done && \
25+
rm -rf /patches && \

0 commit comments

Comments
 (0)