Files
OpenShell/deploy/docker/Dockerfile.ci
T
John T. Myers dd8dd8a60c fix(security): bump container dependencies to remediate 10 CVEs (#736)
- k3s v1.35.2-k3s1 -> v1.35.3-k3s1 (containerd v2.2.2, runc v1.4.1, Go 1.25.7)
- Docker CLI 29.3.0 -> 29.3.1 (Go 1.25.8, containerd v2.2.2)
- syft 1.42.2 -> 1.42.3 (bumps buger/jsonparser)
- Explicit gpgv and python3 upgrades in all container images

Addresses: GHSA-p77j-4mvh-x3m3 (Critical), GHSA-pwhc-rpq9-4c8w,
GHSA-p436-gjf2-799p, GHSA-9h8m-3fm2-qjrq, GHSA-6v2p-p543-phr9,
GHSA-6g7g-w4f8-9c9x, GHSA-4qg8-fj49-pxjh, CVE-2026-4519,
CVE-2025-68973, CVE-2024-36623

Closes #735
2026-04-02 09:50:36 -07:00

81 lines
2.9 KiB
Docker

# syntax=docker/dockerfile:1.4
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# CI runner image with all development tools pre-installed
# Rebuild triggered automatically when mise.toml or this file changes
FROM nvcr.io/nvidia/base/ubuntu:noble-20251013
ARG DOCKER_VERSION=29.3.1
ARG BUILDX_VERSION=v0.32.1
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive
ENV MISE_DATA_DIR=/opt/mise
ENV MISE_CACHE_DIR=/opt/mise/cache
ENV PATH="/opt/mise/shims:/root/.cargo/bin:/root/.local/bin:$PATH"
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
pkg-config \
libssl-dev \
openssh-client \
python3 \
python3-venv \
cmake \
socat \
unzip \
xz-utils \
jq \
rsync \
&& apt-get install -y --only-upgrade gpgv python3 \
&& rm -rf /var/lib/apt/lists/*
# Install Docker CLI and buildx plugin used by CI jobs
RUN case "$TARGETARCH" in \
amd64) docker_arch=x86_64; buildx_arch=amd64 ;; \
arm64) docker_arch=aarch64; buildx_arch=arm64 ;; \
*) echo "Unsupported TARGETARCH: $TARGETARCH"; exit 1 ;; \
esac \
&& curl -fsSL "https://download.docker.com/linux/static/stable/${docker_arch}/docker-${DOCKER_VERSION}.tgz" \
| tar xz --strip-components=1 -C /usr/local/bin docker/docker \
&& mkdir -p /usr/local/lib/docker/cli-plugins \
&& curl -fsSL "https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-${buildx_arch}" \
-o /usr/local/lib/docker/cli-plugins/docker-buildx \
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx
# Install GitHub CLI used by install.sh and CI jobs
ARG GH_VERSION=2.74.1
RUN case "$TARGETARCH" in \
amd64) gh_arch=amd64 ;; \
arm64) gh_arch=arm64 ;; \
*) echo "Unsupported TARGETARCH: $TARGETARCH"; exit 1 ;; \
esac \
&& curl -fsSL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${gh_arch}.tar.gz" \
| tar xz --strip-components=2 -C /usr/local/bin "gh_${GH_VERSION}_linux_${gh_arch}/bin/gh"
# Install mise
ARG MISE_VERSION=v2026.3.13
RUN curl https://mise.run | MISE_VERSION=$MISE_VERSION sh
# Copy mise.toml and task includes, then install all tools via mise
COPY mise.toml /opt/mise/mise.toml
COPY tasks/ /opt/mise/tasks/
WORKDIR /opt/mise
RUN --mount=type=secret,id=MISE_GITHUB_TOKEN \
export MISE_GITHUB_TOKEN="$(cat /run/secrets/MISE_GITHUB_TOKEN 2>/dev/null || true)" && \
mise trust /opt/mise/mise.toml && \
env -u RUSTC_WRAPPER mise install && \
mise reshim && \
(/root/.cargo/bin/rustup component remove rust-docs || true) && \
rm -rf /root/.rustup/toolchains/*/share/doc /root/.rustup/toolchains/*/share/man
# Set working directory for CI jobs
WORKDIR /builds