Skip to content

revert to last commit - graminev1.2 #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cczoo/common/docker/gramine/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fi
if [ -n "$2" ] ; then
image_tag=$2
else
image_tag=gramine-sgx-dev:master-ubuntu20.04-latest
image_tag=gramine-sgx-dev:v1.2-ubuntu20.04-latest
fi

# You can remove no_proxy and proxy_server if your network doesn't need it
Expand Down
41 changes: 13 additions & 28 deletions cczoo/common/docker/gramine/gramine-sgx-dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ RUN apt-get update \
wget \
unzip \
vim \
jq \
autoconf bison gawk nasm ninja-build python3 python3-click \
python3-jinja2 python3-pyelftools wget \
libcurl4-openssl-dev \
libprotobuf-c-dev protobuf-c-compiler protobuf-compiler \
python3-cryptography python3-pip python3-protobuf
jq

ARG BASE_IMAGE=ubuntu:20.04
RUN if [ "${BASE_IMAGE}" = "ubuntu:18.04" ] ; then \
Expand All @@ -70,35 +65,26 @@ RUN apt-get install -y libsgx-dcap-ql-dev libsgx-dcap-default-qpl libsgx-dcap-qu
ENV GRAMINEDIR=/gramine
ENV SGX_DCAP_VERSION=DCAP_1.11
# ENV GRAMINE_VERSION=c662f63bba76736e6d5122a866da762efd1978c1
# ENV GRAMINE_VERSION=v1.2
ENV GRAMINE_VERSION=master
ENV GRAMINE_VERSION=v1.2
ENV ISGX_DRIVER_PATH=${GRAMINEDIR}/driver
# ENV SGX_SIGNER_KEY=${GRAMINEDIR}/Pal/src/host/Linux-SGX/signer/enclave-key.pem
ENV WERROR=1
ENV SGX=1

RUN apt-get update && apt-get install -y bison gawk nasm python3-click python3-jinja2 ninja-build pkg-config \
RUN apt-get install -y bison gawk nasm python3-click python3-jinja2 ninja-build pkg-config \
libcurl4-openssl-dev libprotobuf-c-dev python3-protobuf protobuf-c-compiler \
libgmp-dev libmpfr-dev libmpc-dev libisl-dev

RUN pip3 install --upgrade pip \
&& pip3 install 'meson>=0.56' 'toml>=0.10' cryptography

#todo: use github gramine
RUN mkdir -p ${GRAMINEDIR}
COPY gramine_repo ${GRAMINEDIR}
RUN cd ${GRAMINEDIR} && git checkout ${GRAMINE_VERSION}
#RUN git clone https://github.com/gramineproject/gramine.git ${GRAMINEDIR} \
# && cd ${GRAMINEDIR} \
# && git checkout ${GRAMINE_VERSION}

#todo: use github
RUN mkdir -p ${ISGX_DRIVER_PATH}
COPY SGXDataCenterAttestationPrimitives ${ISGX_DRIVER_PATH}
RUN cd ${ISGX_DRIVER_PATH} && git checkout ${SGX_DCAP_VERSION}
#RUN git clone https://github.com/intel/SGXDataCenterAttestationPrimitives.git ${ISGX_DRIVER_PATH} \
# && cd ${ISGX_DRIVER_PATH} \
# && git checkout ${SGX_DCAP_VERSION}
&& pip3 install toml meson cryptography

RUN git clone https://github.com/gramineproject/gramine.git ${GRAMINEDIR} \
&& cd ${GRAMINEDIR} \
&& git checkout ${GRAMINE_VERSION}

RUN git clone https://github.com/intel/SGXDataCenterAttestationPrimitives.git ${ISGX_DRIVER_PATH} \
&& cd ${ISGX_DRIVER_PATH} \
&& git checkout ${SGX_DCAP_VERSION}

# COPY gramine/patches ${GRAMINEDIR}
# RUN cd ${GRAMINEDIR} \
Expand Down Expand Up @@ -130,8 +116,7 @@ RUN echo "exit 0" > /usr/sbin/policy-rc.d
RUN apt-get clean all \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf ~/.cache/* \
&& rm -rf /tmp/* \
&& rm -rf ${GRAMINEDIR}/build
&& rm -rf /tmp/*

RUN gramine-sgx-gen-private-key

Expand Down