-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (20 loc) · 1.13 KB
/
Copy pathDockerfile
File metadata and controls
30 lines (20 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM alpine:3 as downloader
WORKDIR /work
COPY latest_version.txt latest_version.txt
RUN apk add --no-cache curl && \
arch=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
version=$(cat latest_version.txt) && \
curl -L -S -s -o sysdig-cli-scanner "https://download.sysdig.com/scanning/bin/sysdig-cli-scanner/$version/linux/$arch/sysdig-cli-scanner" && \
sha256sum -c <(curl -sL "https://download.sysdig.com/scanning/bin/sysdig-cli-scanner/$version/linux/$arch/sysdig-cli-scanner.sha256") && \
chmod +x sysdig-cli-scanner
FROM alpine:3
WORKDIR /scanner
RUN apk add --no-cache tini && \
mkdir -p /cache && \
adduser -D -h /scanner scanuser && \
chown -R scanuser:scanuser /cache /scanner
USER scanuser
COPY entrypoint.sh /entrypoint.sh
COPY --chown=scanuser:scanuser --from=downloader /work/sysdig-cli-scanner /scanner/sysdig-cli-scanner
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
CMD [ "--apiurl", "${SYSDIG_SECURE_ENDPOINT}", "--console-log", "--dbpath=/cache/db/", "--cachepath=/cache/scanner-cache/", "${OPTIONS:- --skipupload --full-vulns-table --detailed-policies-eval}", "${IMAGE_NAME}" ]