[tools] Update ubuntu20.04-rt dockerfile for 0.30.0

This commit is contained in:
Qi Zheng 2023-11-01 16:05:15 +08:00 committed by volcano
parent af2643f9e0
commit c506334ca8
2 changed files with 8 additions and 4 deletions

@ -3,9 +3,9 @@ LABEL maintainer="Qi Zheng <huaiqing.zq@antgroup.com>"
# Install SGX DCAP and Occlum runtime # Install SGX DCAP and Occlum runtime
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1
ARG PSW_VERSION=2.17.100.3 ARG PSW_VERSION=2.20.100.4
ARG DCAP_VERSION=1.14.100.3 ARG DCAP_VERSION=1.17.100.4
ARG OCCLUM_VERSION=0.29.7 ARG OCCLUM_VERSION=0.30.0
RUN apt update && DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends gnupg wget ca-certificates jq && \ RUN apt update && DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends gnupg wget ca-certificates jq && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | tee /etc/apt/sources.list.d/intel-sgx.list && \ echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | tee /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 - && \ wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add - && \
@ -37,6 +37,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
ENV PATH="/opt/occlum/build/bin:/usr/local/occlum/bin:$PATH" ENV PATH="/opt/occlum/build/bin:/usr/local/occlum/bin:$PATH"
# This PCCS value could be updated by env passed from user by below entryp # This PCCS value could be updated by env passed from user by below entryp
ENV PCCS_URL="https://localhost:8081/sgx/certification/v3/" ENV PCCS_URL="https://localhost:8081/sgx/certification/v3/"
ENV USE_SECURE_CERT=true
ENTRYPOINT ["docker-entrypoint.sh"] ENTRYPOINT ["docker-entrypoint.sh"]
WORKDIR /root WORKDIR /root

@ -1,7 +1,10 @@
#!/bin/bash #!/bin/bash
# Update PCCS_URL # Update PCCS_URL
line=$(grep -n "pccs_url" /etc/sgx_default_qcnl.conf | cut -d ":" -f 1) line=$(grep -n '"pccs_url"' /etc/sgx_default_qcnl.conf | cut -d ":" -f 1)
sed -i "${line}c \"pccs_url\": \"${PCCS_URL}\"," /etc/sgx_default_qcnl.conf sed -i "${line}c \"pccs_url\": \"${PCCS_URL}\"," /etc/sgx_default_qcnl.conf
# Update use_secure_cert
line=$(grep -n '"use_secure_cert"' /etc/sgx_default_qcnl.conf | cut -d ":" -f 1)
sed -i "${line}c \"use_secure_cert\": ${USE_SECURE_CERT}," /etc/sgx_default_qcnl.conf
exec "$@" exec "$@"