Skip to content

Commit

Permalink
build: move to Ubuntu 22.04
Browse files Browse the repository at this point in the history
The bundle build started failing since Occlum repos changed
their package naming while making packages available also for
jammy.

To fix the build we could just add '-focal' to OCCLUM_VERSION, but
this moves the whole bundle to 22.04/jammy right away since it's
been in plans for quite some time.

Signed-off-by: Mikko Ylinen <[email protected]>
  • Loading branch information
mythi committed Jul 24, 2024
1 parent 4539f9f commit 84fd3a1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tools/packaging/build/unified-bundle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04 as builder
FROM ubuntu:22.04 as builder

ARG KBC=cc-kbc

Expand All @@ -10,14 +10,14 @@ RUN apt-get update && \
wget \
gnupg

ARG OCCLUM_VERSION=0.30.1-focal-1
ARG OCCLUM_VERSION=0.30.1-jammy-1
ARG SGXSDK_VERSION=2_23_100
ARG RUST_VERSION=1.76.0

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=${RUST_VERSION}
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main" | tee -a /etc/apt/sources.list.d/intel-sgx.list \
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main" | tee -a /etc/apt/sources.list.d/intel-sgx.list \
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | gpg --dearmor --output /usr/share/keyrings/intel-sgx.gpg \
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files/99sgx_${SGXSDK_VERSION}_focal_custom_version.cfg | tee -a /etc/apt/preferences.d/99sgx_sdk \
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files/99sgx_${SGXSDK_VERSION}_jammy_custom_version.cfg | tee -a /etc/apt/preferences.d/99sgx_sdk \
&& apt-get update \
&& env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libsgx-uae-service \
Expand All @@ -28,7 +28,7 @@ RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://d
libsgx-quote-ex \
libsgx-dcap-default-qpl

RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/occlum.gpg] https://occlum.io/occlum-package-repos/debian focal main" | tee -a /etc/apt/sources.list.d/occlum.list \
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/occlum.gpg] https://occlum.io/occlum-package-repos/debian jammy main" | tee -a /etc/apt/sources.list.d/occlum.list \
&& wget -qO - https://occlum.io/occlum-package-repos/debian/public.key | gpg --dearmor --output /usr/share/keyrings/occlum.gpg \
&& apt-get update
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -80,22 +80,22 @@ RUN export PATH="$PATH:/opt/occlum/build/bin" && \
export DEBUG="--debug"; \
fi; occlum package ${DEBUG}

FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && \
env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
wget \
gnupg

ARG OCCLUM_VERSION=0.30.1-focal-1
ARG OCCLUM_VERSION=0.30.1-jammy-1
ARG SGXSDK_VERSION=2_23_100

RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main" | tee -a /etc/apt/sources.list.d/intel-sgx.list \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/occlum.gpg] https://occlum.io/occlum-package-repos/debian focal main" | tee -a /etc/apt/sources.list.d/occlum.list \
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main" | tee -a /etc/apt/sources.list.d/intel-sgx.list \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/occlum.gpg] https://occlum.io/occlum-package-repos/debian jammy main" | tee -a /etc/apt/sources.list.d/occlum.list \
&& wget -qO - https://occlum.io/occlum-package-repos/debian/public.key | gpg --dearmor --output /usr/share/keyrings/occlum.gpg \
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | gpg --dearmor --output /usr/share/keyrings/intel-sgx.gpg \
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files/99sgx_${SGXSDK_VERSION}_focal_custom_version.cfg | tee -a /etc/apt/preferences.d/99sgx_sdk \
&& wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/apt_preference_files/99sgx_${SGXSDK_VERSION}_jammy_custom_version.cfg | tee -a /etc/apt/preferences.d/99sgx_sdk \
&& apt-get update \
&& env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libsgx-uae-service \
Expand Down

0 comments on commit 84fd3a1

Please sign in to comment.