Skip to content

Commit 3fdd021

Browse files
tuxpeopleclaude
andcommitted
feat: pin tool versions and enable Renovate tracking
Pinned versions for key dynamically-installed tools to enable better version tracking and changelog visibility: - Flux v2.7.2 - ORAS v1.3.0 - Carvel ytt v0.52.1 - Carvel imgpkg v0.46.1 Changes: - Added ARG declarations for tool versions in Dockerfile - Updated installation commands to use pinned versions - Configured Renovate regex managers to track and update these versions - Added version files for runtime inspection (/etc/<tool>-version) - Updated CLAUDE.md documentation Benefits: - Renovate will create PRs with changelogs when tools are updated - Version changes are now visible in git history - Reproducible builds with locked versions - Users can inspect installed versions at runtime 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 53d1341 commit 3fdd021

File tree

3 files changed

+81
-15
lines changed

3 files changed

+81
-15
lines changed

CLAUDE.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ The container includes 60+ tools across several categories:
8181
- **Performance**: fio, hdparm, ioping, iozone, speedtest-cli
8282
- **General utilities**: bash, curl, wget, jq, yq, vim, git, screen, tmux, htop, lsof, rsync
8383

84-
### Dynamic Tool Versions
85-
Some tools are installed dynamically from their latest releases:
86-
- **ORAS**: Installed from latest GitHub release with fallback to v1.3.0. Version stored in `/etc/oras-version` for runtime inspection.
87-
- **Flux**: Installed via official install script
88-
- **Carvel tools**: Installed via official install script
84+
### Pinned Tool Versions
85+
Key tools have pinned versions managed by Renovate:
86+
- **ORAS**: Version pinned via `ARG ORAS_VERSION` in Dockerfile. Version stored in `/etc/oras-version`
87+
- **Flux**: Version pinned via `ARG FLUX_VERSION` in Dockerfile. Version stored in `/etc/flux-version`
88+
- **Carvel ytt**: Version pinned via `ARG CARVEL_YTT_VERSION` in Dockerfile. Version stored in `/etc/ytt-version`
89+
- **Carvel imgpkg**: Version pinned via `ARG CARVEL_IMGPKG_VERSION` in Dockerfile. Version stored in `/etc/imgpkg-version`
90+
91+
Renovate automatically creates PRs when new versions are released. All version files can be inspected at runtime in `/etc/`.
8992

9093
## Dockerfile Architecture
9194

@@ -125,6 +128,20 @@ When adding tools that are installed from GitHub releases or external sources:
125128

126129
Renovate is configured to automatically update dependencies with automerge enabled for all updates, including patch versions. The configuration ensures fast dependency updates without manual intervention.
127130

131+
### Pinned Tool Updates via Renovate
132+
133+
The following tools are version-pinned in the Dockerfile and automatically updated by Renovate:
134+
- **Flux CLI** (`fluxcd/flux2`)
135+
- **ORAS** (`oras-project/oras`)
136+
- **Carvel ytt** (`carvel-dev/ytt`)
137+
- **Carvel imgpkg** (`carvel-dev/imgpkg`)
138+
139+
Renovate uses regex managers to detect version updates in the Dockerfile `ARG` statements and creates PRs with changelogs when new versions are released. This provides:
140+
- Clear visibility of tool version changes in git history
141+
- Automatic changelog generation from GitHub releases
142+
- Ability to review and test updates before merging
143+
- Reproducible builds with locked versions
144+
128145
## Important Notes
129146

130147
- **Platform Support**: The container builds for `linux/amd64` and `linux/arm64` only. Both PR and release workflows must use identical platform lists.

Dockerfile

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
1313
LABEL org.opencontainers.image.authors="Thomas Deutsch <[email protected]>" \
1414
org.opencontainers.image.description="Debug container with networking and troubleshooting tools"
1515

16+
# Tool versions (managed by Renovate)
17+
ARG FLUX_VERSION=2.7.2
18+
ARG CARVEL_YTT_VERSION=0.52.1
19+
ARG CARVEL_IMGPKG_VERSION=0.46.1
20+
ARG ORAS_VERSION=1.3.0
21+
1622
COPY scripts/* /scripts/
1723
COPY requirements.txt /requirements.txt
1824

@@ -83,20 +89,22 @@ RUN chmod +x /scripts/* \
8389
wget \
8490
which \
8591
yq \
86-
&& curl -s https://fluxcd.io/install.sh | bash \
87-
&& curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=/usr/local/bin bash \
88-
&& rm -f /usr/local/bin/kapp /usr/local/bin/kbld /usr/local/bin/kwt /usr/local/bin/vendir \
8992
&& OS="$(uname -s | tr A-Z a-z)" \
9093
&& ARCH="$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g')" \
91-
&& ORAS_VERSION="$(curl -s https://api.github.com/repos/oras-project/oras/releases/latest | grep -o '"tag_name": *"[^"]*"' | grep -o 'v[0-9][^"]*' || echo 'v1.3.0')" \
92-
&& test -n "${ORAS_VERSION}" || ORAS_VERSION="v1.3.0" \
93-
&& curl -LO "https://github.com/oras-project/oras/releases/download/${ORAS_VERSION}/oras_${ORAS_VERSION#v}_${OS}_${ARCH}.tar.gz" \
94+
&& curl -sL "https://github.com/fluxcd/flux2/releases/download/v${FLUX_VERSION}/flux_${FLUX_VERSION}_${OS}_${ARCH}.tar.gz" | tar xz -C /usr/local/bin \
95+
&& curl -sL "https://github.com/carvel-dev/ytt/releases/download/v${CARVEL_YTT_VERSION}/ytt-${OS}-${ARCH}" -o /usr/local/bin/ytt \
96+
&& curl -sL "https://github.com/carvel-dev/imgpkg/releases/download/v${CARVEL_IMGPKG_VERSION}/imgpkg-${OS}-${ARCH}" -o /usr/local/bin/imgpkg \
97+
&& chmod +x /usr/local/bin/ytt /usr/local/bin/imgpkg \
98+
&& curl -LO "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_${OS}_${ARCH}.tar.gz" \
9499
&& mkdir -p oras-install/ \
95100
&& tar -zxf "oras_${ORAS_VERSION#v}_${OS}_${ARCH}.tar.gz" -C oras-install/ \
96101
&& mv oras-install/oras /usr/local/bin/ \
97-
&& rm -rf "oras_${ORAS_VERSION#v}_${OS}_${ARCH}.tar.gz" oras-install/ \
102+
&& rm -rf "oras_${ORAS_VERSION}_${OS}_${ARCH}.tar.gz" oras-install/ \
98103
&& oras completion bash > /etc/bash_completion.d/oras \
99-
&& echo "${ORAS_VERSION}" > /etc/oras-version \
104+
&& echo "v${ORAS_VERSION}" > /etc/oras-version \
105+
&& echo "v${FLUX_VERSION}" > /etc/flux-version \
106+
&& echo "v${CARVEL_YTT_VERSION}" > /etc/ytt-version \
107+
&& echo "v${CARVEL_IMGPKG_VERSION}" > /etc/imgpkg-version \
100108
&& apk add --no-cache --virtual .build-deps musl-dev python3-dev libffi-dev openssl-dev cargo make \
101109
&& pip install --break-system-packages --no-cache-dir --upgrade pip \
102110
&& pip install --break-system-packages --no-cache-dir --requirement /requirements.txt \
@@ -111,8 +119,11 @@ RUN chmod +x /scripts/* \
111119

112120
WORKDIR /workdir
113121

114-
# Dynamic tool versions are stored in /etc/ for runtime inspection
122+
# Pinned tool versions are stored in /etc/ for runtime inspection
115123
# - /etc/oras-version: ORAS CLI version
124+
# - /etc/flux-version: Flux CLI version
125+
# - /etc/ytt-version: Carvel ytt version
126+
# - /etc/imgpkg-version: Carvel imgpkg version
116127

117128
# environment settings
118129
ENV PS1="\u@debugcontainer($(hostname)):\w\\$ " \

renovate.json

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,45 @@
1616
"patch"
1717
],
1818
"automerge": true,
19-
"automergeType": "pr",
19+
"automergeType": "pr"
20+
}
21+
],
22+
"regexManagers": [
23+
{
24+
"fileMatch": ["^Dockerfile$"],
25+
"matchStrings": [
26+
"ARG FLUX_VERSION=(?<currentValue>.*?)\\n"
27+
],
28+
"datasourceTemplate": "github-releases",
29+
"depNameTemplate": "fluxcd/flux2",
30+
"extractVersionTemplate": "^v?(?<version>.*)$"
31+
},
32+
{
33+
"fileMatch": ["^Dockerfile$"],
34+
"matchStrings": [
35+
"ARG CARVEL_YTT_VERSION=(?<currentValue>.*?)\\n"
36+
],
37+
"datasourceTemplate": "github-releases",
38+
"depNameTemplate": "carvel-dev/ytt",
39+
"extractVersionTemplate": "^v?(?<version>.*)$"
40+
},
41+
{
42+
"fileMatch": ["^Dockerfile$"],
43+
"matchStrings": [
44+
"ARG CARVEL_IMGPKG_VERSION=(?<currentValue>.*?)\\n"
45+
],
46+
"datasourceTemplate": "github-releases",
47+
"depNameTemplate": "carvel-dev/imgpkg",
48+
"extractVersionTemplate": "^v?(?<version>.*)$"
49+
},
50+
{
51+
"fileMatch": ["^Dockerfile$"],
52+
"matchStrings": [
53+
"ARG ORAS_VERSION=(?<currentValue>.*?)\\n"
54+
],
55+
"datasourceTemplate": "github-releases",
56+
"depNameTemplate": "oras-project/oras",
57+
"extractVersionTemplate": "^v?(?<version>.*)$"
2058
}
2159
]
2260
}

0 commit comments

Comments
 (0)