Skip to content

Commit

Permalink
Merge pull request #161 from vbedida79/patch-201123-1
Browse files Browse the repository at this point in the history
tests_l2: updated sgx build to ubi9
  • Loading branch information
uMartinXu authored Nov 20, 2023
2 parents 5abe590 + 195e7c9 commit e065e01
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions tests/l2/sgx/sgx_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ spec:
source:
type: Dockerfile
dockerfile: |
FROM registry.access.redhat.com/ubi8/ubi AS builder
ARG BUILDER=registry.access.redhat.com/ubi9:latest
ARG BASE=registry.access.redhat.com/ubi9-minimal:latest
ARG LINUX_SGX_VERSION=2.22
FROM ${BUILDER} AS builder
ARG SGX_SDK=sgx_linux_x64_sdk_2.19.100.3.bin
ARG LINUX_SGX_VERSION=2.19
ARG SGX_SDK=sgx_linux_x64_sdk_2.22.100.3.bin
ARG LINUX_SGX_VERSION
RUN dnf -y update && \
dnf -y install \
Expand All @@ -37,17 +40,16 @@ spec:
# SGX SDK installed in /opt/intel directory
WORKDIR /opt/intel
RUN wget https://download.01.org/intel-sgx/sgx-linux/$LINUX_SGX_VERSION/distro/rhel8.6-server/$SGX_SDK \
RUN wget https://download.01.org/intel-sgx/sgx-linux/$LINUX_SGX_VERSION/distro/rhel9.2-server/$SGX_SDK \
&& chmod +x $SGX_SDK \
&& echo "yes" | ./$SGX_SDK \
&& rm $SGX_SDK
RUN cd sgxsdk/SampleCode/SampleEnclave \
&& . /opt/intel/sgxsdk/environment \
&& make
FROM registry.access.redhat.com/ubi8-minimal:latest
FROM ${BASE}
ARG LINUX_SGX_VERSION
RUN microdnf -y update && \
microdnf -y install \
wget \
Expand All @@ -57,7 +59,7 @@ spec:
# Download SGX PSW and install SGX runtime components to create SGX enclave
WORKDIR /opt/intel
RUN wget https://download.01.org/intel-sgx/latest/linux-latest/distro/rhel8.6-server/sgx_rpm_local_repo.tgz \
RUN wget https://download.01.org/intel-sgx/sgx-linux/$LINUX_SGX_VERSION/distro/rhel9.2-server/sgx_rpm_local_repo.tgz \
&& sha256sum sgx_rpm_local_repo.tgz \
&& tar xvf sgx_rpm_local_repo.tgz \
&& rm -rf sgx_rpm_local_repo.tgz
Expand All @@ -78,10 +80,14 @@ spec:
noCache: true
dockerStrategy:
buildArgs:
- name: "BUILDER"
value: "registry.access.redhat.com/ubi9:9.2"
- name: "BASE"
value: "registry.access.redhat.com/ubi9-minimal:9.2"
- name: "SGX_SDK"
value: "sgx_linux_x64_sdk_2.19.100.3.bin"
value: "sgx_linux_x64_sdk_2.22.100.3.bin"
- name: "LINUX_SGX_VERSION"
value: "2.19"
value: "2.22"
output:
to:
kind: ImageStreamTag
Expand Down

0 comments on commit e065e01

Please sign in to comment.