Skip to content

Commit 888268e

Browse files
committed
fix: use ARG for k3s version instead of runtime api call
Signed-off-by: bupd <bupdprasanth@gmail.com>
1 parent 888cb77 commit 888268e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

bootc/Containerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ RUN --mount=type=tmpfs,dst=/tmp --mount=type=cache,dst=/usr/lib/sysimage/cache/p
5151
&& pacman -S --clean --noconfirm
5252

5353
# k3s binary
54-
RUN K3S_VERSION=$(curl -sfL https://update.k3s.io/v1-release/channels | jq -r '.data[] | select(.id=="stable") | .latest') && \
55-
K3S_URL_VERSION=$(echo "$K3S_VERSION" | sed 's/+/%2B/g') && \
56-
curl -sfL -o /usr/local/bin/k3s "https://github.com/k3s-io/k3s/releases/download/${K3S_URL_VERSION}/k3s" && \
54+
ARG K3S_VERSION=v1.34.5+k3s1
55+
RUN curl -sfL -o /usr/local/bin/k3s "https://github.com/k3s-io/k3s/releases/download/$(echo ${K3S_VERSION} | sed 's/+/%2B/g')/k3s" && \
5756
chmod +x /usr/local/bin/k3s && \
58-
ln -sf /usr/local/bin/k3s /usr/local/bin/kubectl && \
5957
ln -sf /usr/local/bin/k3s /usr/local/bin/crictl && \
6058
ln -sf /usr/local/bin/k3s /usr/local/bin/ctr
6159

0 commit comments

Comments
 (0)