-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile2
More file actions
75 lines (61 loc) · 2.7 KB
/
Dockerfile2
File metadata and controls
75 lines (61 loc) · 2.7 KB
1
2
3
4
5
6
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Use an official ocaml runtime as a parent image
# Install jammy
FROM ubuntu:22.04
EXPOSE 80/tcp
# Set the working directory to /app
WORKDIR /app
# This is to avoid interactive questions from tzdata
ENV DEBIAN_FRONTEND=noninteractive
# install some requirements
RUN apt-get update \
&& apt-get install -y apt-utils git wget iptables libdevmapper1.02.1 \
&& apt-get install -y build-essential ocaml ocamlbuild automake autoconf libtool python-is-python3 libssl-dev git cmake perl \
&& apt-get install -y libssl-dev libcurl4-openssl-dev protobuf-compiler libprotobuf-dev debhelper cmake reprepro unzip pkgconf libboost-dev libboost-system-dev libboost-thread-dev lsb-release libsystemd0 \
&& apt-get install -y libcurl4-openssl-dev protobuf-compiler libprotobuf-dev debhelper reprepro unzip build-essential python3 \
&& apt-get install -y lsb-release software-properties-common pkg-config libuv1-dev python3-matplotlib emacs psmisc jq iproute2 stress-ng
# clone sgx sdk
RUN mkdir /opt/intel \
&& cd /opt/intel \
&& git clone https://github.com/intel/linux-sgx
# build sdk
RUN cd /opt/intel/linux-sgx \
&& make preparation \
&& make sdk \
&& make sdk_install_pkg
# Do we need this even though this is an ubuntu 22.04?
# Does it need to be right after make preparation?
# && cp /opt/intel/linux-sgx/external/toolset/ubuntu20.04/* /usr/local/bin \
# install SDK
RUN cd /opt/intel/linux-sgx/linux/installer/bin \
&& echo -e "no\n/opt/intel\n" | ./sgx_linux_x64_sdk_2.25.100.3.bin
# build PSW
RUN mkdir /etc/init
RUN . /opt/intel/sgxsdk/environment \
&& cd /opt/intel/linux-sgx \
&& make psw \
&& make deb_psw_pkg \
&& make deb_local_repo
RUN echo "deb [trusted=yes arch=amd64] file:/opt/intel/linux-sgx/linux/installer/deb/sgx_debian_local_repo jammy main" >> /etc/apt/sources.list
RUN echo "# deb-src [trusted=yes arch=amd64] file:/opt/intel/linux-sgx/linux/installer/deb/sgx_debian_local_repo jammy main" >> /etc/apt/sources.list
RUN apt update
# install psw
RUN apt-get install -y libsgx-launch libsgx-urts libsgx-epid libsgx-quote-ex libsgx-dcap-ql
RUN cd /opt/intel/linux-sgx/external/dcap_source/QuoteVerification/sgxssl/Linux \
&& ./build_openssl.sh \
&& make all \
&& make install
# install salticidae
RUN git clone https://github.com/vrahli/salticidae.git \
&& cd salticidae \
&& cmake . -DCMAKE_INSTALL_PREFIX=. \
&& make \
&& make install \
&& pwd
#run apt-get install -y gcc-9 g++-9
# Copy the current directory contents into the container at /app
COPY Makefile /app
COPY experiments.py /app
COPY enclave.token /app
COPY App /app/App
COPY Enclave /app/Enclave
#### build container: docker build -f Dockerfile2 -t damysus2 .