Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930
  1. FROM ubuntu:22.04 AS sgx
  2. RUN apt update && apt install -y build-essential ocaml ocamlbuild \
  3. automake autoconf libtool wget python-is-python3 libssl-dev \
  4. git cmake perl unzip debhelper libcurl4-openssl-dev \
  5. protobuf-compiler reprepro
  6. WORKDIR /root
  7. RUN git clone https://github.com/intel/linux-sgx
  8. WORKDIR /root/linux-sgx
  9. RUN git checkout sgx_2.22
  10. RUN make preparation
  11. RUN make sdk_install_pkg
  12. RUN cd linux/installer/bin/ && echo -e "no\n/opt/intel" | ./sgx_linux_x64_sdk_2.22*
  13. RUN make psw_install_pkg
  14. RUN cd linux/installer/bin/ && ./sgx_linux_x64_psw_2.22* --no-start-aesm
  15. WORKDIR /root
  16. RUN git clone https://github.com/intel/intel-sgx-ssl
  17. WORKDIR /root/intel-sgx-ssl/openssl_source
  18. RUN wget https://www.openssl.org/source/openssl-3.0.12.tar.gz
  19. WORKDIR /root/intel-sgx-ssl/Linux
  20. RUN make
  21. RUN make install
  22. WORKDIR /root
  23. RUN addgroup sgx
  24. RUN addgroup sgx_prv
  25. RUN adduser aesmd sgx
  26. RUN adduser aesmd sgx_prv
  27. COPY start-aesmd /usr/local/sbin
  28. RUN chown aesmd.aesmd /var/run/aesmd
  29. RUN chmod 755 /usr/local/sbin/start-aesmd
  30. ENTRYPOINT ["/usr/local/sbin/start-aesmd"]