Files
OpenShell/deploy/docker/Dockerfile.ci
Alexander Watson 1d7909cb38 chore: add open-source compliance files and SPDX headers (#71)
Add Apache 2.0 licensing, SPDX copyright headers on all source files,
DCO enforcement, third-party notices, and CI enforcement.

- LICENSE: Apache License 2.0 full text
- DCO: Developer Certificate of Origin 1.1
- SPDX headers on all 176 source files (.rs, .py, .proto, .rego, .sh,
  .toml, .yaml, Dockerfiles)
- scripts/update_license_headers.py: header management with --check mode
- scripts/generate_third_party_notices.py: dependency license aggregation
- THIRD-PARTY-NOTICES: generated listing of all Rust and Python deps
- build/license.toml: mise tasks for license:check and license:update
- CI: license-headers job in checks.yml, DCO check workflow
- CONTRIBUTING.md: DCO sign-off requirement and license header docs
- Cargo.toml: license changed to Apache-2.0, repository URL updated
- pyproject.toml: license field added

Closes #58
2026-03-03 09:30:56 -08:00

75 lines
2.5 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 ubuntu:24.04
ARG DOCKER_VERSION=27.5.1
ARG BUILDX_VERSION=v0.21.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 \
python3 \
python3-venv \
cmake \
socat \
unzip \
xz-utils \
&& 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 AWS CLI v2 used for ECR publishing
RUN case "$TARGETARCH" in \
amd64) aws_arch=x86_64 ;; \
arm64) aws_arch=aarch64 ;; \
*) echo "Unsupported TARGETARCH: $TARGETARCH"; exit 1 ;; \
esac \
&& curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-${aws_arch}.zip" -o /tmp/awscliv2.zip \
&& unzip -q /tmp/awscliv2.zip -d /tmp \
&& /tmp/aws/install \
&& rm -rf /tmp/aws /tmp/awscliv2.zip
# Install mise
RUN curl https://mise.run | sh
# Copy mise.toml and build task includes, then install all tools via mise
COPY mise.toml /opt/mise/mise.toml
COPY build/ /opt/mise/build/
WORKDIR /opt/mise
ARG MISE_GITHUB_TOKEN
RUN mise trust /opt/mise/mise.toml && \
env -u RUSTC_WRAPPER mise install && \
/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