-
Notifications
You must be signed in to change notification settings - Fork 160
/
Copy pathteaclave-rt.ubuntu-1804.Dockerfile
77 lines (62 loc) · 3.14 KB
/
teaclave-rt.ubuntu-1804.Dockerfile
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
76
77
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
FROM ubuntu:18.04
ENV VERSION 2.17.100.3-bionic1
ENV SGX_DOWNLOAD_URL_BASE "https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/ubuntu18.04-server"
ENV SGX_LINUX_X64_SDK sgx_linux_x64_sdk_2.17.101.1.bin
ENV SGX_LINUX_X64_SDK_URL "$SGX_DOWNLOAD_URL_BASE/$SGX_LINUX_X64_SDK"
RUN apt-get update && apt-get install -q -y \
libcurl4-openssl-dev \
libprotobuf-dev \
curl \
pkg-config \
wget
RUN echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main' | \
tee /etc/apt/sources.list.d/intel-sgx.list
RUN curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add -
RUN apt-get update && apt-get install -q -y \
libsgx-launch=$VERSION \
libsgx-urts=$VERSION \
libsgx-quote-ex=$VERSION \
libsgx-uae-service=$VERSION
RUN mkdir /etc/init
# Install Intel SGX SDK for libsgx_urts_sim.so
RUN wget $SGX_LINUX_X64_SDK_URL && \
chmod u+x $SGX_LINUX_X64_SDK && \
echo -e 'no\n/opt' | ./$SGX_LINUX_X64_SDK && \
rm $SGX_LINUX_X64_SDK && \
echo 'source /opt/sgxsdk/environment' >> /etc/environment
ENV LD_LIBRARY_PATH=/opt/sgxsdk/sdk_libs
# Make a directory for fusion data. Since we are in the single machine mode,
# there is no need to mount a network file system.
RUN mkdir -p /tmp/fusion_data
ADD release/services/teaclave_frontend_service /teaclave/
ADD release/services/teaclave_frontend_service_enclave.signed.so /teaclave/
ADD release/services/teaclave_authentication_service /teaclave/
ADD release/services/teaclave_authentication_service_enclave.signed.so /teaclave/
ADD release/services/teaclave_management_service /teaclave/
ADD release/services/teaclave_management_service_enclave.signed.so /teaclave/
ADD release/services/teaclave_scheduler_service /teaclave/
ADD release/services/teaclave_scheduler_service_enclave.signed.so /teaclave/
ADD release/services/teaclave_access_control_service /teaclave/
ADD release/services/teaclave_access_control_service_enclave.signed.so /teaclave/
ADD release/services/teaclave_storage_service /teaclave/
ADD release/services/teaclave_storage_service_enclave.signed.so /teaclave/
ADD release/services/teaclave_execution_service /teaclave/
ADD release/services/teaclave_execution_service_enclave.signed.so /teaclave/
ADD release/services/enclave_info.toml /teaclave/
ADD release/services/auditors /teaclave/auditors