Remove obsolete dockerfiles
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
This commit is contained in:
parent
acb750b5e4
commit
36990fc97c
@ -1,197 +0,0 @@
|
|||||||
FROM alpine:3.11 AS alpine
|
|
||||||
|
|
||||||
RUN apk update && \
|
|
||||||
apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
|
|
||||||
FROM registry.cn-hangzhou.aliyuncs.com/alinux/aliyunlinux
|
|
||||||
|
|
||||||
LABEL maintainer="Chunyang Hui <sanqian.hcy@antgroup.com>"
|
|
||||||
|
|
||||||
#The default shell for the RUN instruction is ["/bin/sh", "-c"], which sometimes cause unexpected error
|
|
||||||
#for example "source a_file". Use bash as default shell instead.
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
RUN yum install -y --nogpgcheck \
|
|
||||||
alinux-release-experimentals && \
|
|
||||||
yum install -y --nogpgcheck \
|
|
||||||
astyle \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
bison \
|
|
||||||
bzip2 \
|
|
||||||
boost-devel \
|
|
||||||
ca-certificates \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
curl-devel \
|
|
||||||
createrepo \
|
|
||||||
expect \
|
|
||||||
expat \
|
|
||||||
expat-devel \
|
|
||||||
gettext \
|
|
||||||
file \
|
|
||||||
fuse-devel \
|
|
||||||
fuse-libs \
|
|
||||||
gawk \
|
|
||||||
gcc \
|
|
||||||
gcc-c++ \
|
|
||||||
glibc-headers \
|
|
||||||
gdb \
|
|
||||||
git-core \
|
|
||||||
gmp-devel \
|
|
||||||
golang \
|
|
||||||
jq \
|
|
||||||
libmpc-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
libtool \
|
|
||||||
pkgconfig \
|
|
||||||
python \
|
|
||||||
kmod \
|
|
||||||
make \
|
|
||||||
mod_ssl \
|
|
||||||
mpfr-devel \
|
|
||||||
ocaml \
|
|
||||||
ocaml-ocamlbuild \
|
|
||||||
openssl \
|
|
||||||
openssl-devel \
|
|
||||||
patch \
|
|
||||||
python3 \
|
|
||||||
sudo \
|
|
||||||
uuid-devel \
|
|
||||||
vim \
|
|
||||||
wget \
|
|
||||||
yum-utils && \
|
|
||||||
yum groupinstall -y 'Development Tools' && \
|
|
||||||
yum clean all
|
|
||||||
|
|
||||||
# Upgrade gcc to compile occlum toolchain.
|
|
||||||
# This may vary across different platforms depending on the source of gcc.
|
|
||||||
# Use aliyunlinux devtoolset to upgrade gcc to 8.
|
|
||||||
RUN yum install -y scl-utils alinux-release-experimentals rpm-build && \
|
|
||||||
yum install -y devtoolset-8-gcc-c++ devtoolset-8-gcc devtoolset-8-gdb devtoolset-8-binutils devtoolset-8-make && \
|
|
||||||
printf "unset BASH_ENV PROMPT_COMMAND ENV\nsource scl_source enable devtoolset-8\n" > /usr/bin/scl_enable
|
|
||||||
|
|
||||||
ENV BASH_ENV="/usr/bin/scl_enable"
|
|
||||||
ENV ENV="/usr/bin/scl_enable"
|
|
||||||
ENV PROMPT_COMMAND=". /usr/bin/scl_enable"
|
|
||||||
|
|
||||||
# With alinux-release-experimentals, install higher version of git and protobuf (3.5).
|
|
||||||
RUN yum install -y \
|
|
||||||
git \
|
|
||||||
protobuf \
|
|
||||||
protobuf-c \
|
|
||||||
protobuf-compiler \
|
|
||||||
protobuf-c-compiler \
|
|
||||||
protobuf-c-devel \
|
|
||||||
protobuf-devel
|
|
||||||
|
|
||||||
# Install PSW and DCAP RPM packages
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN wget https://mirrors.openanolis.org/inclavare-containers/alinux2/sgx_rpm_local_repo.tar.gz && \
|
|
||||||
tar -xzf sgx_rpm_local_repo.tar.gz && \
|
|
||||||
rm -f sgx_rpm_local_repo.tar.gz && \
|
|
||||||
cd /tmp/sgx_rpm_local_repo && \
|
|
||||||
rpm -ivh --nodeps libsgx-ae-pce*.rpm \
|
|
||||||
libsgx-headers*.rpm \
|
|
||||||
libsgx-ae-qe3*.rpm \
|
|
||||||
libsgx-ae-qve*.rpm \
|
|
||||||
libsgx-enclave-common*.rpm \
|
|
||||||
libsgx-quote-ex*.rpm \
|
|
||||||
libsgx-urts*.rpm \
|
|
||||||
libsgx-dcap-ql*.rpm \
|
|
||||||
libsgx-qe3-logic*.rpm \
|
|
||||||
libsgx-pce-logic*.rpm \
|
|
||||||
libsgx-dcap-quote-verify*.rpm \
|
|
||||||
libsgx-dcap-ql*.rpm \
|
|
||||||
libsgx-dcap-ql-dev*.rpm \
|
|
||||||
libsgx-dcap-default-qpl*.rpm \
|
|
||||||
libsgx-dcap-default-qpl-dev*.rpm \
|
|
||||||
libsgx-dcap-quote-verify-dev*.rpm \
|
|
||||||
libsgx-uae-service*.rpm \
|
|
||||||
libsgx-epid*.rpm \
|
|
||||||
libsgx-launch*.rpm \
|
|
||||||
libsgx-ae-le-*.rpm \
|
|
||||||
libsgx-aesm-launch-plugin-*.rpm \
|
|
||||||
sgx-aesm-service*.rpm && \
|
|
||||||
rm -rf /tmp/sgx_rpm_local_repo
|
|
||||||
|
|
||||||
# Install SGX SDK
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone -b sgx_2.13.3_for_occlum https://github.com/occlum/linux-sgx && \
|
|
||||||
cd linux-sgx && \
|
|
||||||
make preparation && \
|
|
||||||
./compile_and_install.sh no_mitigation USE_OPT_LIBS=2 && \
|
|
||||||
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \
|
|
||||||
rm -rf /tmp/linux-sgx
|
|
||||||
|
|
||||||
# Install cpuid tool for tests
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN wget http://www.etallen.com/cpuid/cpuid-20200211.x86_64.tar.gz && \
|
|
||||||
tar -xf ./cpuid-20200211.x86_64.tar.gz && \
|
|
||||||
cp ./cpuid-20200211/cpuid /usr/bin/ && \
|
|
||||||
rm -rf /tmp/cpuid-20200211*
|
|
||||||
|
|
||||||
# Install Occlum toolchain
|
|
||||||
COPY toolchains/musl-gcc /tmp/musl-gcc
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd musl-gcc && ./build.sh && ./install_zlib.sh && rm -rf /tmp/musl-gcc
|
|
||||||
ENV PATH="/opt/occlum/build/bin:/usr/local/occlum/bin:$PATH"
|
|
||||||
|
|
||||||
# Install glibc
|
|
||||||
COPY toolchains/glibc /tmp/glibc
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd glibc && ./build.sh && rm -rf /tmp/glibc
|
|
||||||
|
|
||||||
# Install Occlum Golang toolchain
|
|
||||||
COPY toolchains/golang /tmp/golang
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN yum install -y go && cd golang && ./build.sh && rm -rf /tmp/golang
|
|
||||||
ENV PATH="/usr/local/occlum/golang/bin:$PATH"
|
|
||||||
|
|
||||||
# Install Occlum Java toolchain (JDK 11)
|
|
||||||
ARG JDK11_PATH=/opt/occlum/toolchains/jvm/java-11-openjdk
|
|
||||||
COPY --from=alpine /usr/lib/jvm/java-11-openjdk $JDK11_PATH
|
|
||||||
RUN rm $JDK11_PATH/lib/security/cacerts
|
|
||||||
COPY --from=alpine /etc/ssl/certs/java/cacerts $JDK11_PATH/lib/security/cacerts
|
|
||||||
COPY toolchains/java /tmp/java
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd java && ./install_dragonwell.sh && rm -rf /tmp/java
|
|
||||||
ENV PATH="/opt/occlum/toolchains/jvm/bin:$PATH"
|
|
||||||
|
|
||||||
# Install Rust
|
|
||||||
ENV PATH="/root/.cargo/bin:$PATH"
|
|
||||||
ENV OCCLUM_RUST_VERSION=nightly-2020-10-25
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | \
|
|
||||||
sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \
|
|
||||||
rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \
|
|
||||||
cargo -V
|
|
||||||
|
|
||||||
# Install Occlum Rust toolchain
|
|
||||||
COPY toolchains/rust /tmp/rust
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd rust && ./build.sh && rm -rf /tmp/rust
|
|
||||||
ENV PATH="/opt/occlum/toolchains/rust/bin:$PATH"
|
|
||||||
|
|
||||||
ARG OCCLUM_BRANCH
|
|
||||||
ENV LD_LIBRARY_PATH="/opt/intel/sgxpsw/aesm:/usr/lib64/:/usr/local/lib:/opt/intel/sgxsdk/sdk_libs:/usr/lib:$LD_LIBRARY_PATH"
|
|
||||||
# Install the latest version of Occlum
|
|
||||||
WORKDIR /root/occlum
|
|
||||||
RUN rm -rf occlum && \
|
|
||||||
source scl_source enable devtoolset-8 && \
|
|
||||||
git clone -b $OCCLUM_BRANCH https://github.com/occlum/occlum && \
|
|
||||||
cd occlum && \
|
|
||||||
source /opt/intel/sgxsdk/environment && \
|
|
||||||
make submodule && \
|
|
||||||
OCCLUM_RELEASE_BUILD=1 make install && \
|
|
||||||
cp -r demos /root/demos && \
|
|
||||||
rm -rf /root/occlum
|
|
||||||
|
|
||||||
# Start AESM service automatically
|
|
||||||
#
|
|
||||||
# To do so, we add the script to ~/.bashrc. We cannot use systemd to run AESM
|
|
||||||
# as a "real" service since the pid 1 is not systemd in Docker. So we start
|
|
||||||
# up AESM service when an user login with an interative shell.
|
|
||||||
COPY docker/start_aesm.sh /opt/occlum/
|
|
||||||
RUN mkdir -p /var/run/aesmd && echo 'sudo /opt/occlum/start_aesm.sh' >> /root/.bashrc
|
|
||||||
|
|
||||||
WORKDIR /root
|
|
@ -1,148 +0,0 @@
|
|||||||
FROM alpine:3.11 AS alpine
|
|
||||||
|
|
||||||
LABEL maintainer="Qing Li <geding.lq@antgroup.com>"
|
|
||||||
|
|
||||||
RUN apk update && \
|
|
||||||
apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
|
|
||||||
FROM centos:7.5.1804
|
|
||||||
|
|
||||||
LABEL maintainer="He Sun <bochang.sh@antfin.com>"
|
|
||||||
|
|
||||||
RUN yum install -y \
|
|
||||||
astyle \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
ca-certificates \
|
|
||||||
boost-devel \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
curl-devel \
|
|
||||||
epel-release \
|
|
||||||
expect \
|
|
||||||
fuse-devel \
|
|
||||||
fuse-libs \
|
|
||||||
gcc \
|
|
||||||
gcc-c++ \
|
|
||||||
glibc-headers \
|
|
||||||
gdb \
|
|
||||||
git \
|
|
||||||
git-core \
|
|
||||||
gmp-devel \
|
|
||||||
libmpc-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
libtool \
|
|
||||||
nano \
|
|
||||||
pkgconfig \
|
|
||||||
python \
|
|
||||||
kmod \
|
|
||||||
make \
|
|
||||||
mod_ssl \
|
|
||||||
mpfr-devel \
|
|
||||||
ocaml \
|
|
||||||
ocaml-ocamlbuild \
|
|
||||||
openssl \
|
|
||||||
openssl-devel \
|
|
||||||
sudo \
|
|
||||||
uuid-devel \
|
|
||||||
vim \
|
|
||||||
wget && \
|
|
||||||
yum groupinstall 'Development Tools' -y && \
|
|
||||||
yum install -y golang && \
|
|
||||||
yum clean all
|
|
||||||
|
|
||||||
# Install Protobuf (version >= 3.0)
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN yum install -y https://cbs.centos.org/kojifiles/packages/protobuf/3.6.1/4.el7/x86_64/protobuf-3.6.1-4.el7.x86_64.rpm && \
|
|
||||||
yum install -y https://cbs.centos.org/kojifiles/packages/protobuf/3.6.1/4.el7/x86_64/protobuf-compiler-3.6.1-4.el7.x86_64.rpm && \
|
|
||||||
yum install -y https://cbs.centos.org/kojifiles/packages/protobuf/3.6.1/4.el7/x86_64/protobuf-devel-3.6.1-4.el7.x86_64.rpm
|
|
||||||
|
|
||||||
# Upgrade git (version >= 1.8.4)
|
|
||||||
RUN yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && \
|
|
||||||
yum install -y git
|
|
||||||
|
|
||||||
# Install cpuid tool for tests
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN wget http://www.etallen.com/cpuid/cpuid-20200211.x86_64.tar.gz && \
|
|
||||||
tar -xf ./cpuid-20200211.x86_64.tar.gz && \
|
|
||||||
cp ./cpuid-20200211/cpuid /usr/bin/ && \
|
|
||||||
rm -rf /tmp/cpuid-20200211*
|
|
||||||
|
|
||||||
# Upgrade GCC
|
|
||||||
# Use Developer Toolset 8 from Software Collections (SCLs) to have a newer gcc (8.3.1) than
|
|
||||||
# the native one (4.8.5) and enable it during the build.
|
|
||||||
RUN yum install centos-release-scl-rh -y && \
|
|
||||||
yum install devtoolset-8-toolchain -y && \
|
|
||||||
printf "unset BASH_ENV PROMPT_COMMAND ENV\nsource scl_source enable devtoolset-8\n" > /usr/bin/scl_enable && \
|
|
||||||
echo 'source /opt/rh/devtoolset-8/enable' >> /root/.bashrc
|
|
||||||
ARG BASH_ENV="/usr/bin/scl_enable"
|
|
||||||
ARG ENV="/usr/bin/scl_enable"
|
|
||||||
ARG PROMPT_COMMAND=". /usr/bin/scl_enable"
|
|
||||||
|
|
||||||
# Install SGX SDK
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone -b sgx_2.9.1_for_occlum https://github.com/occlum/linux-sgx && \
|
|
||||||
cd linux-sgx && \
|
|
||||||
./download_prebuilt.sh && \
|
|
||||||
./compile_and_install.sh no_mitigation && \
|
|
||||||
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \
|
|
||||||
rm -rf /tmp/linux-sgx
|
|
||||||
|
|
||||||
# Install Rust
|
|
||||||
ENV PATH="/root/.cargo/bin:$PATH"
|
|
||||||
ENV OCCLUM_RUST_VERSION=nightly-2020-04-07
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | \
|
|
||||||
sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \
|
|
||||||
rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \
|
|
||||||
cargo -V && \
|
|
||||||
cargo install sccache
|
|
||||||
|
|
||||||
# Install Occlum toolchain
|
|
||||||
COPY toolchains/gcc /tmp/gcc
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd gcc && ./build.sh && ./install_zlib.sh && rm -rf /tmp/gcc
|
|
||||||
ENV PATH="/opt/occlum/build/bin:/usr/local/occlum/bin:$PATH"
|
|
||||||
|
|
||||||
# Install Occlum Golang toolchain
|
|
||||||
COPY toolchains/golang /tmp/golang
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd golang && ./build.sh && rm -rf /tmp/golang
|
|
||||||
ENV PATH="/opt/occlum/toolchains/golang/bin:$PATH"
|
|
||||||
|
|
||||||
# Install Occlum Rust toolchain
|
|
||||||
COPY toolchains/rust /tmp/rust
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd rust && ./build.sh && rm -rf /tmp/rust
|
|
||||||
ENV PATH="/opt/occlum/toolchains/rust/bin:$PATH"
|
|
||||||
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/intel/sgxsdk/sdk_libs"
|
|
||||||
|
|
||||||
# Install Occlum Java toolchain (JDK 11)
|
|
||||||
ARG JDK11_PATH=/opt/occlum/toolchains/jvm/java-11-openjdk
|
|
||||||
COPY --from=alpine /usr/lib/jvm/java-11-openjdk $JDK11_PATH
|
|
||||||
RUN rm $JDK11_PATH/lib/security/cacerts
|
|
||||||
COPY --from=alpine /etc/ssl/certs/java/cacerts $JDK11_PATH/lib/security/cacerts
|
|
||||||
COPY toolchains/java /tmp/java
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd java && ./install_dragonwell.sh && rm -rf /tmp/java
|
|
||||||
ENV PATH="/opt/occlum/toolchains/jvm/bin:$PATH"
|
|
||||||
|
|
||||||
# Install the latest version of Occlum
|
|
||||||
WORKDIR /root
|
|
||||||
RUN git clone https://github.com/occlum/occlum && \
|
|
||||||
cd occlum && \
|
|
||||||
source /root/.bashrc && \
|
|
||||||
make submodule && \
|
|
||||||
OCCLUM_RELEASE_BUILD=1 make && \
|
|
||||||
make install && \
|
|
||||||
cp -r demos /root/demos && \
|
|
||||||
rm -rf /root/occlum
|
|
||||||
|
|
||||||
# Start AESM service automatically
|
|
||||||
#
|
|
||||||
# To do so, we add the script to ~/.bashrc. We cannot use systemd to run AESM
|
|
||||||
# as a "real" service since the pid 1 is not systemd in Docker. So we start
|
|
||||||
# up AESM service when an user login with an interative shell.
|
|
||||||
COPY docker/start_aesm.sh /opt/occlum/
|
|
||||||
RUN echo '/opt/occlum/start_aesm.sh' >> /root/.bashrc
|
|
||||||
|
|
||||||
WORKDIR /root
|
|
@ -1,158 +0,0 @@
|
|||||||
FROM alpine:3.11 AS alpine
|
|
||||||
LABEL maintainer="Qing Li <geding.lq@antgroup.com>"
|
|
||||||
RUN apk update && \
|
|
||||||
apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
|
|
||||||
FROM centos:8.1.1911
|
|
||||||
|
|
||||||
LABEL maintainer="He Sun <bochang.sh@antgroup.com>"
|
|
||||||
|
|
||||||
RUN yum install epel-release -y && \
|
|
||||||
dnf clean all && rm -r /var/cache/dnf && \
|
|
||||||
dnf group install 'Development Tools' -y && \
|
|
||||||
dnf --enablerepo=PowerTools install -y \
|
|
||||||
astyle \
|
|
||||||
bison \
|
|
||||||
boost-devel \
|
|
||||||
cmake \
|
|
||||||
createrepo \
|
|
||||||
curl-devel \
|
|
||||||
expect \
|
|
||||||
fuse-devel \
|
|
||||||
fuse-libs \
|
|
||||||
gawk \
|
|
||||||
gmp-devel \
|
|
||||||
golang \
|
|
||||||
jq \
|
|
||||||
libcurl-devel \
|
|
||||||
libmpc-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
mod_ssl \
|
|
||||||
mpfr-devel \
|
|
||||||
nano \
|
|
||||||
ocaml \
|
|
||||||
ocaml-ocamlbuild \
|
|
||||||
openssl \
|
|
||||||
openssl-devel \
|
|
||||||
perl \
|
|
||||||
protobuf-devel \
|
|
||||||
python2 \
|
|
||||||
python3 \
|
|
||||||
sudo \
|
|
||||||
wget \
|
|
||||||
uuid-devel \
|
|
||||||
vim \
|
|
||||||
yum-utils \
|
|
||||||
http://downloads.sourceforge.net/ltp/lcov-1.14-1.noarch.rpm &&\
|
|
||||||
alternatives --set python /usr/bin/python2
|
|
||||||
|
|
||||||
# Install cpuid tool for tests
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN wget http://www.etallen.com/cpuid/cpuid-20200211.x86_64.tar.gz && \
|
|
||||||
tar -xf ./cpuid-20200211.x86_64.tar.gz && \
|
|
||||||
cp ./cpuid-20200211/cpuid /usr/bin/ && \
|
|
||||||
rm -rf /tmp/cpuid-20200211*
|
|
||||||
|
|
||||||
# Install Rust
|
|
||||||
ENV PATH="/root/.cargo/bin:$PATH"
|
|
||||||
ENV OCCLUM_RUST_VERSION=nightly-2020-09-08
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | \
|
|
||||||
sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \
|
|
||||||
rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \
|
|
||||||
cargo -V
|
|
||||||
|
|
||||||
# Install Occlum toolchain
|
|
||||||
COPY toolchains/musl-gcc /tmp/musl-gcc
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd musl-gcc && ./build.sh && ./install_zlib.sh && rm -rf /tmp/musl-gcc
|
|
||||||
ENV PATH="/opt/occlum/build/bin:/usr/local/occlum/bin:$PATH"
|
|
||||||
|
|
||||||
# Install glibc
|
|
||||||
COPY toolchains/glibc /tmp/glibc
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd glibc && ./build.sh && rm -rf /tmp/glibc
|
|
||||||
|
|
||||||
# Install Occlum Golang toolchain
|
|
||||||
COPY toolchains/golang /tmp/golang
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd golang && ./build.sh && rm -rf /tmp/golang
|
|
||||||
ENV PATH="/opt/occlum/toolchains/golang/bin:$PATH"
|
|
||||||
|
|
||||||
# Install Occlum Rust toolchain
|
|
||||||
COPY toolchains/rust /tmp/rust
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd rust && ./build.sh && rm -rf /tmp/rust
|
|
||||||
ENV PATH="/opt/occlum/toolchains/rust/bin:$PATH"
|
|
||||||
ENV LD_LIBRARY_PATH="/opt/intel/sgxsdk/sdk_libs"
|
|
||||||
|
|
||||||
# Install Occlum Java toolchain (JDK 11)
|
|
||||||
ARG JDK11_PATH=/opt/occlum/toolchains/jvm/java-11-openjdk
|
|
||||||
COPY --from=alpine /usr/lib/jvm/java-11-openjdk $JDK11_PATH
|
|
||||||
RUN rm $JDK11_PATH/lib/security/cacerts
|
|
||||||
COPY --from=alpine /etc/ssl/certs/java/cacerts $JDK11_PATH/lib/security/cacerts
|
|
||||||
COPY toolchains/java /tmp/java
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN cd java && ./install_dragonwell.sh && rm -rf /tmp/java
|
|
||||||
ENV PATH="/opt/occlum/toolchains/jvm/bin:$PATH"
|
|
||||||
|
|
||||||
# Install SGX PSW
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN echo "ca_directory=/etc/ssl/certs" >> /etc/wgetrc && \
|
|
||||||
wget https://download.01.org/intel-sgx/sgx-linux/2.11/distro/centos8.1-server/sgx_rpm_local_repo.tgz && \
|
|
||||||
tar -xvf sgx_rpm_local_repo.tgz && \
|
|
||||||
rm sgx_rpm_local_repo.tgz && \
|
|
||||||
wget https://download.01.org/intel-sgx/sgx-dcap/1.8/linux/distro/centos8.1-server/sgx_rpm_local_repo.tgz && \
|
|
||||||
tar -xvf sgx_rpm_local_repo.tgz && \
|
|
||||||
rm sgx_rpm_local_repo.tgz && \
|
|
||||||
cd /tmp/sgx_rpm_local_repo &&\
|
|
||||||
rpm -ivh libsgx-ae-pce*.rpm \
|
|
||||||
libsgx-ae-qe3*.rpm \
|
|
||||||
libsgx-ae-qve*.rpm \
|
|
||||||
libsgx-enclave-common*.rpm \
|
|
||||||
libsgx-quote-ex*.rpm \
|
|
||||||
libsgx-urts*.rpm \
|
|
||||||
libsgx-dcap-ql*.rpm \
|
|
||||||
libsgx-qe3-logic*.rpm \
|
|
||||||
libsgx-pce-logic*.rpm \
|
|
||||||
libsgx-dcap-quote-verify*.rpm \
|
|
||||||
libsgx-dcap-ql*.rpm \
|
|
||||||
libsgx-dcap-ql-dev*.rpm \
|
|
||||||
libsgx-dcap-default-qpl*.rpm \
|
|
||||||
libsgx-dcap-default-qpl-dev*.rpm \
|
|
||||||
libsgx-dcap-quote-verify-dev*.rpm \
|
|
||||||
libsgx-uae-service*.rpm \
|
|
||||||
libsgx-epid*.rpm \
|
|
||||||
libsgx-launch*.rpm \
|
|
||||||
sgx-aesm-service*.rpm && \
|
|
||||||
rm -rf /tmp/sgx_rpm_local_repo
|
|
||||||
|
|
||||||
# Install SGX SDK
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone -b sgx_2.11_for_occlum https://github.com/occlum/linux-sgx && \
|
|
||||||
cd linux-sgx && \
|
|
||||||
make preparation && \
|
|
||||||
./compile_and_install.sh no_mitigation USE_OPT_LIBS=2 && \
|
|
||||||
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \
|
|
||||||
rm -rf /tmp/linux-sgx
|
|
||||||
|
|
||||||
# Install the latest version of Occlum
|
|
||||||
ARG OCCLUM_BRANCH
|
|
||||||
WORKDIR /root
|
|
||||||
RUN git clone -b $OCCLUM_BRANCH https://github.com/occlum/occlum && \
|
|
||||||
cd occlum && \
|
|
||||||
source /root/.bashrc && \
|
|
||||||
make submodule && \
|
|
||||||
OCCLUM_RELEASE_BUILD=1 make && \
|
|
||||||
make install && \
|
|
||||||
cp -r demos /root/demos && \
|
|
||||||
rm -rf /root/occlum
|
|
||||||
|
|
||||||
# Start AESM service automatically
|
|
||||||
#
|
|
||||||
# To do so, we add the script to ~/.bashrc. We cannot use systemd to run AESM
|
|
||||||
# as a "real" service since the pid 1 is not systemd in Docker. So we start
|
|
||||||
# up AESM service when an user login with an interative shell.
|
|
||||||
COPY docker/start_aesm.sh /opt/occlum/
|
|
||||||
RUN mkdir -p /var/run/aesmd && echo '/opt/occlum/start_aesm.sh' >> /root/.bashrc
|
|
||||||
|
|
||||||
WORKDIR /root
|
|
Loading…
Reference in New Issue
Block a user