From 9fe3e6212827171ec024e51ace195460403a2992 Mon Sep 17 00:00:00 2001 From: Jason Greathouse Date: Wed, 8 Jan 2025 17:36:20 -0600 Subject: [PATCH] update to 24.04 base #none --- .gitignore | 1 + Dockerfile.devcontainer | 11 ++++++++--- Dockerfile.fat-builder | 1 + Dockerfile.rust-base | 3 +-- Dockerfile.rust-sgx | 6 +++--- README.md | 1 + 6 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d74e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/Dockerfile.devcontainer b/Dockerfile.devcontainer index 39cfc93..cf95d17 100644 --- a/Dockerfile.devcontainer +++ b/Dockerfile.devcontainer @@ -17,11 +17,16 @@ ARG USER_UID=1000 ARG USER_GID=$USER_UID # Create the user -RUN groupadd --gid "${USER_GID}" "${USERNAME}" \ +RUN userdel -r ubuntu \ + && groupadd --gid "${USER_GID}" "${USERNAME}" \ && useradd --uid "${USER_UID}" --gid "${USER_GID}" -m "${USERNAME}" -s /bin/bash \ && echo "${USERNAME} ALL=(root) NOPASSWD:ALL" > "/etc/sudoers.d/${USERNAME}" \ && chmod 0440 "/etc/sudoers.d/${USERNAME}" \ - && chown -R sentz:sentz /opt + && chown -R sentz:sentz /opt \ + && mkdir -p /home/sentz/.config/pip \ + && echo "[global]" >> /home/sentz/.config/pip/pip.conf \ + && echo "break-system-packages = true" >> /home/sentz/.config/pip/pip.conf \ + && chown -R sentz:sentz /home/sentz COPY startup-devcontainer.sh /usr/local/bin/startup-devcontainer.sh @@ -35,7 +40,7 @@ COPY --from=base / / ENV RUSTUP_HOME=/opt/rustup ENV CARGO_HOME=/opt/cargo ENV GOPATH=/opt/go/ -ENV PATH="/opt/cargo/bin:/usr/local/go/bin:${GOPATH}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/intel/sgxsdk/bin:/opt/intel/sgxsdk/bin/x64" +ENV PATH="/home/sentz/.local/bin:/opt/cargo/bin:/usr/local/go/bin:${GOPATH}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/intel/sgxsdk/bin:/opt/intel/sgxsdk/bin/x64" ENV SGX_SDK=/opt/intel/sgxsdk ENV PKG_CONFIG_PATH=/opt/intel/sgxsdk/pkgconfig ENV LD_LIBRARY_PATH=/opt/intel/sgxsdk/sdk_libs diff --git a/Dockerfile.fat-builder b/Dockerfile.fat-builder index ac7f591..90caa1d 100644 --- a/Dockerfile.fat-builder +++ b/Dockerfile.fat-builder @@ -21,6 +21,7 @@ RUN apt-get update \ postgresql-client \ python3 \ python3-pip \ + python3-poetry \ psmisc \ sudo \ && apt-get clean \ diff --git a/Dockerfile.rust-base b/Dockerfile.rust-base index b944607..5cf3451 100644 --- a/Dockerfile.rust-base +++ b/Dockerfile.rust-base @@ -1,7 +1,7 @@ # Copyright (c) 2022 to 2024 MobileCoin Inc. # hadolint global ignore=DL3008, DL3015 -FROM ubuntu:focal-20241011 +FROM ubuntu:noble-20241118.1 ARG TARGETARCH SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -34,7 +34,6 @@ RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime \ libhidapi-dev \ libprotobuf-dev \ libpq-dev \ - libssl1.1 \ libssl-dev \ libudev-dev \ libusb-1.0-0-dev \ diff --git a/Dockerfile.rust-sgx b/Dockerfile.rust-sgx index c05f6a0..ef540e9 100644 --- a/Dockerfile.rust-sgx +++ b/Dockerfile.rust-sgx @@ -9,17 +9,17 @@ FROM mobilecoin/rust-base:${BASE_IMAGE_TAG} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install SGX SDK -ARG SGX_URL=https://download.01.org/intel-sgx/sgx-linux/2.23/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.23.100.2.bin +ARG SGX_URL=https://download.01.org/intel-sgx/sgx-linux/2.23/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.23.100.2.bin RUN curl -sSfL -o sgx.bin "${SGX_URL}" \ && chmod +x ./sgx.bin \ && ./sgx.bin --prefix=/opt/intel \ && rm ./sgx.bin # Install DCAP libraries -ARG DCAP_VERSION=1.20.100.2-focal1 +ARG DCAP_VERSION=1.22.100.3-noble1 RUN mkdir -p /etc/apt/keyrings \ && curl -sSfL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | gpg --dearmor -o /etc/apt/keyrings/intel-sgx.gpg \ - && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main" | tee /etc/apt/sources.list.d/intel-sgx.list \ + && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu noble main" | tee /etc/apt/sources.list.d/intel-sgx.list \ && apt-get update \ && apt-get install -y \ libsgx-dcap-ql=${DCAP_VERSION} \ diff --git a/README.md b/README.md index a61f567..6cf34df 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ We recommend referencing the image by the hash instead of a tag to verify a cons `rust-base` can be used by CI/CD for building and testing mobilecoin rust projects. To build locally. + ``` docker build -f ./Dockerfile.rust-base -t mobilecoin/rust-base:latest . ```