Fix zk installation URL to use versioned release filename

The zk GitHub releases use versioned filenames (zk-v0.15.2-linux-amd64.tar.gz),
not the generic pattern. Use the GitHub API to find the correct download URL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
tobias
2026-03-29 22:12:17 +02:00
parent e62a14dafc
commit bfc3042b9b
+4 -2
View File
@@ -45,8 +45,10 @@ RUN curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/in
|| echo "navi installation skipped (offline build)"
# Install zk (wiki browser with [[wiki-links]], fzf search, backlinks)
RUN curl -sL https://github.com/zk-org/zk/releases/latest/download/zk-linux-amd64.tar.gz \
| tar xz -C /usr/local/bin/ 2>/dev/null \
RUN ZK_URL=$(curl -sL https://api.github.com/repos/zk-org/zk/releases/latest \
| grep -o '"browser_download_url": "[^"]*linux-amd64[^"]*"' \
| head -1 | cut -d'"' -f4) \
&& if [ -n "$ZK_URL" ]; then curl -sL "$ZK_URL" | tar xz -C /usr/local/bin/; fi \
|| echo "zk installation skipped (offline build)"
# Create data directory and set permissions