Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 24.04 base #47

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
11 changes: 8 additions & 3 deletions Dockerfile.devcontainer
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
1 change: 1 addition & 0 deletions Dockerfile.fat-builder
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apt-get update \
postgresql-client \
python3 \
python3-pip \
python3-poetry \
psmisc \
sudo \
&& apt-get clean \
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.rust-base
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down Expand Up @@ -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 \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.rust-sgx
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
```
Expand Down