mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
sgx-sdk-demo: add DCAP Quote Generation sample
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
2a2993b13c
commit
8677e0e99b
@ -6,7 +6,6 @@ RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
wget \
|
||||
unzip \
|
||||
curl \
|
||||
protobuf-compiler \
|
||||
libprotobuf-dev \
|
||||
build-essential \
|
||||
@ -15,6 +14,8 @@ RUN apt-get update && \
|
||||
gdb \
|
||||
vim \
|
||||
python3 \
|
||||
git \
|
||||
gnupg \
|
||||
&& apt-get -y -q upgrade \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@ -23,6 +24,15 @@ RUN apt-get update && \
|
||||
WORKDIR /opt/intel
|
||||
|
||||
ARG SGX_SDK_INSTALLER=sgx_linux_x64_sdk_2.11.100.2.bin
|
||||
ARG DCAP_VERSION=DCAP_1.8
|
||||
|
||||
RUN echo "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main" >> /etc/apt/sources.list.d/intel-sgx.list \
|
||||
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y \
|
||||
libsgx-dcap-ql-dev \
|
||||
libsgx-dcap-default-qpl-dev \
|
||||
libsgx-quote-ex-dev
|
||||
|
||||
# Install SGX SDK
|
||||
RUN wget https://download.01.org/intel-sgx/sgx-linux/2.11/distro/ubuntu18.04-server/$SGX_SDK_INSTALLER \
|
||||
@ -30,9 +40,17 @@ RUN wget https://download.01.org/intel-sgx/sgx-linux/2.11/distro/ubuntu18.04-ser
|
||||
&& echo "yes" | ./$SGX_SDK_INSTALLER \
|
||||
&& rm $SGX_SDK_INSTALLER
|
||||
|
||||
RUN git clone -b $DCAP_VERSION https://github.com/intel/SGXDataCenterAttestationPrimitives.git
|
||||
|
||||
RUN cd sgxsdk/SampleCode/SampleEnclave \
|
||||
&& . /opt/intel/sgxsdk/environment \
|
||||
&& make
|
||||
&& make \
|
||||
&& cd -
|
||||
|
||||
RUN cd SGXDataCenterAttestationPrimitives/SampleCode/QuoteGenerationSample \
|
||||
&& . /opt/intel/sgxsdk/environment \
|
||||
&& make \
|
||||
&& cd -
|
||||
|
||||
FROM ubuntu:bionic
|
||||
|
||||
@ -45,13 +63,19 @@ RUN apt-get update && \
|
||||
RUN echo "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main" >> /etc/apt/sources.list.d/intel-sgx.list \
|
||||
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y libsgx-enclave-common libsgx-urts \
|
||||
&& mkdir -p /opt/intel/sgx-sample-app/
|
||||
&& apt-get install -y \
|
||||
libsgx-enclave-common \
|
||||
libsgx-urts \
|
||||
libsgx-quote-ex \
|
||||
libsgx-dcap-ql \
|
||||
libsgx-dcap-default-qpl \
|
||||
&& mkdir -p /opt/intel/sgx-sample-app/ \
|
||||
&& mkdir -p /opt/intel/sgx-quote-generation/
|
||||
|
||||
COPY --from=builder /opt/intel/sgxsdk/SampleCode/SampleEnclave/app /opt/intel/sgx-sample-app/sgx-sample-app
|
||||
COPY --from=builder /opt/intel/sgxsdk/SampleCode/SampleEnclave/enclave.signed.so /opt/intel/sgx-sample-app/enclave.signed.so
|
||||
COPY --from=builder /opt/intel/sgxsdk/SampleCode/SampleEnclave/enclave.so /opt/intel/sgx-sample-app/enclave.so
|
||||
|
||||
WORKDIR /opt/intel/sgx-sample-app/
|
||||
COPY --from=builder /opt/intel/SGXDataCenterAttestationPrimitives/SampleCode/QuoteGenerationSample/app /opt/intel/sgx-quote-generation/sgx-quote-generation
|
||||
COPY --from=builder /opt/intel/SGXDataCenterAttestationPrimitives/SampleCode/QuoteGenerationSample/enclave.signed.so /opt/intel/sgx-quote-generation/enclave.signed.so
|
||||
|
||||
ENTRYPOINT /opt/intel/sgx-sample-app/sgx-sample-app
|
||||
|
Loading…
Reference in New Issue
Block a user