#0000 - Switch Trivy installation to script-based method in Dockerfile.
This commit is contained in:
parent
c3e3eed0e3
commit
5237516000
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue