Skip to content

Commit 11a0eef

Browse files
init
0 parents  commit 11a0eef

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docker/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM ghcr.io/aquasecurity/trivy:canary
2+
3+
RUN set -eux; \
4+
mkdir -p /root/.cache/db root/.cache/java-db root/.cache/fanal; \
5+
6+
RUN set -eux; \
7+
TRIVY_TEMP_DIR=$(mktemp -d); \
8+
trivy --cache-dir $TRIVY_TEMP_DIR image --download-db-only\; \
9+
# tar -cf ./db.tar.gz -C $TRIVY_TEMP_DIR/db ./cache/db/metadata.json ./cache/db/trivy.db; \
10+
# rm -rf $TRIVY_TEMP_DIR;

t.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
4+
docker run -v ./trivy_cache/:/root/.cache/ -v /var/run/docker.sock:/var/run/docker.sock aquasecurity/trivy:canary image --download-db-only

0 commit comments

Comments
 (0)