From 3b39b5bf85187013bc4ac19ae0359355de6a9e70 Mon Sep 17 00:00:00 2001 From: Georgi Panov <77702912+Darkfella91@users.noreply.github.com> Date: Wed, 20 Nov 2024 03:31:53 +0200 Subject: [PATCH] Update Dockerfile --- .devcontainer/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e769e26fc..3a39661a3 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,6 +5,8 @@ ARG USER_UID=1000 ARG USER_GID=$USER_UID ARG FLUX_VERSION=2.4.0 ARG SOPS_VERSION=v3.9.1 +ARG KUBECTL_VERSION=v1.31.2 +ARG HELMFILE_VERSION=v0.169.1 ENV SHELL=/bin/bash @@ -32,8 +34,8 @@ RUN echo "**** Installing packages ****" && \ echo "**** Adding direnv hook ****" && \ echo 'eval "$(direnv hook bash)"' >> /home/$USERNAME/.bashrc && \ echo "**** Installing binaries ****" && \ - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256" && \ + curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" && \ + curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl.sha256" && \ echo "$(cat kubectl.sha256) kubectl" | sha256sum --check --strict && \ chmod +x ./kubectl && \ mv ./kubectl /usr/local/bin/kubectl && \ @@ -54,11 +56,11 @@ RUN echo "**** Installing packages ****" && \ mv sops-$SOPS_VERSION.linux.amd64 /usr/local/bin/sops && \ chmod +x /usr/local/bin/sops && \ curl -sL https://talos.dev/install | sh && \ - curl -LO https://github.com/helmfile/helmfile/releases/download/$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name')/helmfile_$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name' | sed 's/^v//')_checksums.txt && \ - curl -LO https://github.com/helmfile/helmfile/releases/download/$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name')/helmfile_$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name' | sed 's/^v//')_linux_amd64.tar.gz && \ - grep "helmfile_$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name' | sed 's/^v//')_linux_amd64.tar.gz" helmfile_$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name' | sed 's/^v//')_checksums.txt > checksum-helmfile-linux-amd64.txt && \ + curl -LO https://github.com/helmfile/helmfile/releases/download/$HELMFILE_VERSION/helmfile_$(echo $HELMFILE_VERSION | sed 's/^v//')_checksums.txt && \ + curl -LO https://github.com/helmfile/helmfile/releases/download/$HELMFILE_VERSION/helmfile_$(echo $HELMFILE_VERSION | sed 's/^v//')_linux_amd64.tar.gz && \ + grep "helmfile_$(echo $HELMFILE_VERSION | sed 's/^v//')_linux_amd64.tar.gz" helmfile_$(echo $HELMFILE_VERSION | sed 's/^v//')_checksums.txt > checksum-helmfile-linux-amd64.txt && \ echo "$(cat checksum-helmfile-linux-amd64.txt)" | sha256sum --check --strict && \ - tar -xvzf helmfile_$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name' | sed 's/^v//')_linux_amd64.tar.gz && \ + tar -xvzf helmfile_$(echo $HELMFILE_VERSION | sed 's/^v//')_linux_amd64.tar.gz && \ chmod +x ./helmfile && \ mv helmfile /usr/local/bin/helmfile && \ curl -fsSL -o get_task.sh https://taskfile.dev/install.sh && \