Files
kata-containers/tools/packaging/static-build/shim-v2/Dockerfile
Fabiano Fidêncio 5c0269881e tests: Make editorconfig-checker happy
- Trim trailing whitespace and ensure final newline in non-vendor files
- Add .editorconfig-checker.json excluding vendor dirs, *.patch, *.img,
  *.dtb, *.drawio, *.svg, and pkg/cloud-hypervisor/client so CI only
  checks project code
- Leave generated and binary assets unchanged (excluded from checker)

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 21:58:28 +01:00

62 lines
1.9 KiB
Docker

# Copyright (c) 2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV GO_HOME="/opt"
ENV GOCACHE="${GO_HOME}/.cache"
ENV RUSTUP_HOME="/opt/rustup"
ENV CARGO_HOME="/opt/cargo"
ENV PATH="/opt/cargo/bin/:/opt/go/bin:${PATH}"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN mkdir ${RUSTUP_HOME} ${CARGO_HOME} ${GOCACHE} && \
chmod -R a+rwX ${RUSTUP_HOME} ${CARGO_HOME} ${GO_HOME}
ARG GO_VERSION
ARG RUST_VERSION
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
gcc \
git \
make \
cmake \
musl-tools \
protobuf-compiler \
sudo && \
apt-get clean && rm -rf /var/lib/apt/lists/&& \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_VERSION}
RUN ARCH=$(uname -m); \
rust_arch=""; \
libc=""; \
case "${ARCH}" in \
"aarch64") rust_arch="${ARCH}"; libc="musl"; ;; \
"ppc64le") rust_arch="powerpc64le"; libc="gnu"; ;; \
"x86_64") rust_arch="${ARCH}"; libc="musl"; ;; \
"s390x") rust_arch="${ARCH}"; libc="gnu"; ;; \
*) echo "Unsupported architecture: ${ARCH}" && exit 1 ;; \
esac; \
rustup target add "${rust_arch}-unknown-linux-${libc}"
RUN ARCH=$(uname -m); \
goarch=""; \
kernelname=$(uname -s | tr '[:upper:]' '[:lower:]'); \
case "${ARCH}" in \
"aarch64") goarch="arm64" ;; \
"ppc64le") goarch=${ARCH} ;; \
"x86_64") goarch="amd64" ;; \
"s390x") goarch=${ARCH} ;; \
*) echo "Unsupported architecture: ${ARCH}" && exit 1 ;; \
esac; \
curl -fsSOL "https://go.dev/dl/go${GO_VERSION}.${kernelname}-${goarch}.tar.gz" && \
tar -C "${GO_HOME}" -xzf "go${GO_VERSION}.${kernelname}-${goarch}.tar.gz" && \
rm "go${GO_VERSION}.${kernelname}-${goarch}.tar.gz"