# Inbound agent with the build tools the labs use. Downloads are checked against the release checksums.
FROM jenkins/inbound-agent:3384.v60d89463d9e0-2-jdk21@sha256:3452f69764fffd742276590733ddc82c5643144cc78be76e0617f3f2f544425c
USER root
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends python3 python3-pytest curl >/dev/null \
 && rm -rf /var/lib/apt/lists/*
RUN set -e; arch=$(dpkg --print-architecture); case "$arch" in \
      arm64) c=ade83b7aac62e131cacfe96d958948b2150cc9efec46a570a2649b8e27dedad2 s=410cbfa0ae0f63246bc0057843760b1de2833cd23919e025e368fd7681308cdb ;; \
      amd64) c=424e2c97d0b45fd7a6b608a87f090f35633f4c23ece5f092d48bba11aaf4bbfa s=9c077a7d43029b3b13e98a8db720661e700c4d58db6352153a06395ae4a2a704 ;; \
      *) echo "unsupported $arch"; exit 1 ;; esac; \
    curl -fsSLo /usr/local/bin/cosign "https://github.com/sigstore/cosign/releases/download/v3.1.4/cosign-linux-$arch"; \
    echo "$c  /usr/local/bin/cosign" | sha256sum -c -; chmod 755 /usr/local/bin/cosign; \
    curl -fsSLo /tmp/syft.tgz "https://github.com/anchore/syft/releases/download/v1.57.0/syft_1.57.0_linux_$arch.tar.gz"; \
    echo "$s  /tmp/syft.tgz" | sha256sum -c -; tar -xzf /tmp/syft.tgz -C /usr/local/bin syft; rm /tmp/syft.tgz
USER jenkins
