From 52375160005d3f51f90339c6f2912c1b73502ce0 Mon Sep 17 00:00:00 2001
From: Guiillaume Hemmen <guillaume@van-hemmen.com>
Date: Wed, 25 Jun 2025 16:27:01 +0000
Subject: [PATCH] #0000 - Switch Trivy installation to script-based method in
 Dockerfile.

---
 Dockerfile | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index e45c4be..3e2dfc4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -45,10 +45,9 @@ RUN echo "PS1='🐳 \[\033[1;36m\] \[\033[1;34m\]\W\[\033[0;35m\] \[\033[1;36m\]
     chown -R coder:coder /workspaces
 
 # Run trivy to scan the system
-RUN apt-get update && apt-get install -y trivy && \
-    trivy filesystem --exit-code 1 --no-progress / && \
-    apt-get remove -y trivy && \
-    rm -rf /var/lib/apt/lists/*
+RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \
+       && trivy filesystem --exit-code 1 --no-progress / \
+       && rm -rf /usr/local/bin/trivy
 
 # Switch to non-root user
 USER coder