24 lines
817 B
Docker
24 lines
817 B
Docker
FROM occlum/occlum:latest-ubuntu20.04 AS build
|
|
|
|
WORKDIR /
|
|
RUN mkdir sgx_libs &&\
|
|
cp /usr/lib/x86_64-linux-gnu/libsgx_* sgx_libs/ &&\
|
|
cp /usr/lib/x86_64-linux-gnu/libdcap_quoteprov.so.1 sgx_libs/libdcap_quoteprov.so
|
|
|
|
FROM ubuntu:20.04
|
|
|
|
RUN apt update -y && apt install -y jq curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY challenge.sh /challenge.sh
|
|
COPY challenge.tar.gz /challenge.tar.gz
|
|
COPY challenge.qcnl.conf /etc/sgx_default_qcnl.conf
|
|
|
|
COPY --from=build /opt/occlum/build/bin/occlum-run /opt/occlum/build/bin/occlum-run
|
|
COPY --from=build /opt/occlum/build/bin/occlum /usr/bin/occlum
|
|
COPY --from=build /sgx_libs /sgx_libs
|
|
RUN cp /sgx_libs/* /usr/lib/x86_64-linux-gnu/
|
|
RUN tar -xzf /challenge.tar.gz && cp /challenge.sh /challenge/challenge.sh
|
|
|
|
WORKDIR /challenge
|
|
ENTRYPOINT ["/challenge/challenge.sh"]
|