Files
homelab/ci/images/tofu/Containerfile
T
claude-bot 2feec4b193
ci/woodpecker/push/build-ci-images Pipeline was successful
fix(ci): pin base image digests, verify tool checksums, pin claude-code version
Addresses #209. All four ci/images/*/Containerfile FROM lines were
tag-pinned only (alpine:3.21, node:22-alpine), letting the base silently
change between builds. Pin each to its current manifest-list digest.

ci/images/k8s/Containerfile downloaded talosctl, kubectl, and velero via
curl with no integrity check, and installed flux via `curl | bash`
(itself an unpinned, unverified fetch-and-execute). Replace the flux
install with a pinned-version tarball download verified against its
published sha256 checksum, same as talosctl/kubectl/velero now are.
kubectl's version was also resolved dynamically from dl.k8s.io's
stable.txt at build time instead of being pinned; add KUBECTL_VERSION.

ci/images/tofu/Containerfile's tofu.zip download gets the same
sha256 verification.

ci/images/claude/Containerfile's CLAUDE_CODE_VERSION defaulted to
`latest` and was never overridden by build-ci-images.yml, so the image
holding repo/issue-write tokens floated to whatever npm resolved at
build time. Pin it to the current release (2.1.209).

Checksums and digests verified against the respective registries/release
APIs at fix time (2026-07-14).

Co-Authored-By: Claude Bot <claude-bot@renner.uno>
2026-07-14 12:10:41 +02:00

34 lines
918 B
Docker

FROM alpine:3.21@sha256:48b0309ca019d89d40f670aa1bc06e426dc0931948452e8491e3d65087abc07d
ARG TOFU_VERSION=1.11.0
RUN apk add --no-cache \
ansible \
bash \
bind-tools \
ca-certificates \
curl \
git \
jq \
openssh-client \
openssl \
python3 \
py3-pip \
sshpass \
unzip
RUN curl -sfL -o /tmp/tofu.zip \
"https://github.com/opentofu/opentofu/releases/download/v${TOFU_VERSION}/tofu_${TOFU_VERSION}_linux_amd64.zip" \
&& echo "c425c2080e3f204a1fe094356777535a34c4bc9fdbca4eccb74cdd25c1ae8a94 /tmp/tofu.zip" | sha256sum -c - \
&& unzip -q /tmp/tofu.zip -d /tmp/tofu \
&& install /tmp/tofu/tofu /usr/local/bin/tofu \
&& rm -rf /tmp/tofu /tmp/tofu.zip
RUN pip3 install --break-system-packages --no-cache-dir \
proxmoxer \
requests
RUN ansible-galaxy collection install \
community.proxmox \
community.docker