Skip to content

Commit e48cfd2

Browse files
committed
updated dockerfile
1 parent 38c85be commit e48cfd2

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

deployer-image/Dockerfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,32 @@ RUN apt-get update && \
3535
wget \
3636
unzip \
3737
git \
38-
jq && \
38+
jq \
39+
curl && \
3940
# Install Terraform
4041
wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
4142
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin/ && \
4243
rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
4344
# Install yq with specific version
4445
wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64 && \
4546
chmod +x /usr/local/bin/yq && \
47+
# Install latest kubectl versions to fix CVE-2025-8959, CVE-2025-61729, and CVE-2025-22868
48+
# These vulnerabilities affect kubectl binaries built with vulnerable Go dependencies
49+
# Installing latest kubectl versions that were built with fixed Go 1.22.6+ and updated dependencies
50+
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt) && \
51+
mkdir -p /opt/kubectl/1.30 /opt/kubectl/1.31 && \
52+
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
53+
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256" && \
54+
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check && \
55+
chmod +x kubectl && \
56+
cp kubectl /opt/kubectl/1.30/kubectl && \
57+
cp kubectl /opt/kubectl/1.31/kubectl && \
58+
cp kubectl /usr/local/bin/kubectl && \
59+
rm kubectl kubectl.sha256 && \
4660
# Upgrade pip to latest version to fix CVE-2024-35195 and CVE-2025-47273
4761
python3 -m pip install --upgrade pip setuptools wheel --no-cache-dir && \
4862
# Clean up
49-
apt-get remove -y wget unzip && \
63+
apt-get remove -y wget unzip curl && \
5064
apt-get autoremove -y && \
5165
apt-get clean && \
5266
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)