Dockerfile 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. FROM graphene
  2. ENV SGX_SDK=/opt/intel/sgxsdk/
  3. RUN mkdir source
  4. WORKDIR source
  5. ## Setting up prereqs for decryptor - Intel SGX SSL
  6. # Just curling the tar.gz file and then running the build script didn't work as the extracted folder had a different name (dependent on the foldername which was compressed) --- I didnt want to make a new fork of the sgxssl script for that.
  7. RUN git clone https://github.com/openssl/openssl.git OpenSSL_1.1.1d && \
  8. cd OpenSSL_1.1.1d && git checkout tags/OpenSSL_1_1_1d && \
  9. cd ../ && tar -cf OpenSSL_1.1.1d.tar.gz OpenSSL_1.1.1d/
  10. #Setting up SGXSSL with the version of OpenSSL that we downloaded in the previous step.
  11. RUN git clone https://github.com/intel/intel-sgx-ssl.git && \
  12. cd intel-sgx-ssl && git checkout tags/lin_2.5_1.1.1d && \
  13. cp ../OpenSSL_1.1.1d.tar.gz ./openssl_source/ && \
  14. cd Linux && make && make install
  15. #Temp - TODO: Make the git repo public and remove these commands and retest.
  16. #COPY gitcrysp-docker-deploy-key.id_rsa /root/.ssh/id_rsa
  17. #COPY gitcrysp-docker-deploy-key.id_rsa.pub /root/.ssh/id_rsa.pub
  18. #RUN ssh-keyscan git-crysp.uwaterloo.ca > /root/.ssh/known_hosts
  19. #Setting up protobuf definitions for exchanging LA and post-LA messages between enclaves.
  20. RUN git clone gogs@git-crysp.uwaterloo.ca:miti/dhmsgs_proto_defs.git && \
  21. cd dhmsgs_proto_defs/ && protoc --cpp_out=./ ./*.proto
  22. #Setting up the decryptor enclave itself.
  23. RUN git clone gogs@git-crysp.uwaterloo.ca:miti/Decryptor.git && \
  24. cd Decryptor/ && make
  25. #Setting up common files used in the verifier, PHP extension for LA/post-LA message processing.
  26. RUN git clone gogs@git-crysp.uwaterloo.ca:miti/commonVerifierPHPfiles.git
  27. #Setting up a patched version of the linux-sgx repo's SDK for running LA on graphene.
  28. RUN git clone gogs@git-crysp.uwaterloo.ca:miti/linux-sgx-trts-modified.git && \
  29. cd linux-sgx-trts-modified && git checkout local_attestation_for_graphene && \
  30. bash ./download_prebuilt.sh && make USE_OPT_LIBS=0
  31. #Setting up the verifier.
  32. RUN git clone gogs@git-crysp.uwaterloo.ca:miti/verifier.git && \
  33. cd verifier/ && git checkout recreating_state_for_teeter && \
  34. export SGX_SDK_TRTS_MODIFIED=/root/source/linux-sgx-trts-modified/build/linux && make && \
  35. cp verifier /root/graphene/LibOS/shim/test/native && \
  36. git checkout master && \
  37. cp verifier.manifest.template /root/graphene/LibOS/shim/test/native && \
  38. cp grapheneMakefile /root/graphene/LibOS/shim/test/native/Makefile
  39. #Verifier manifest file, makefile changes - comment out JDK/python related content
  40. WORKDIR /root/graphene/LibOS/shim/test/native
  41. RUN make SGX=1 #&& make SGX_RUN=1
  42. RUN apt update && apt install -y php7.0-dev tmux
  43. WORKDIR /root/source
  44. RUN git clone --recursive https://github.com/CopernicaMarketingSoftware/PHP-CPP.git && \
  45. cd PHP-CPP/ && git checkout tags/v2.1.4 && make all && \
  46. cp libphpcpp.so.* /usr/lib/ && make install
  47. RUN git clone gogs@git-crysp.uwaterloo.ca:miti/Apache_PHP_extension.git && \
  48. cd Apache_PHP_extension && \
  49. make
  50. #WORKDIR /root/graphene/LibOS/shim/test/apps/apache
  51. #RUN make SGX=1 && make SGX_RUN=1