-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (25 loc) · 1.01 KB
/
Dockerfile
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
31
FROM ghcr.io/dockhippie/golang:1.23 AS build
# renovate: datasource=github-releases depName=aquasecurity/trivy
ENV TRIVY_VERSION=0.58.2
ARG TARGETARCH
RUN case "${TARGETARCH}" in \
'amd64') \
curl -sSLo /tmp/trivy.tar.gz https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz; \
;; \
'arm64') \
curl -sSLo /tmp/trivy.tar.gz https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-ARM64.tar.gz; \
;; \
'arm') \
curl -sSLo /tmp/trivy.tar.gz https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-ARM.tar.gz; \
;; \
*) echo >&2 "error: unsupported architecture '${TARGETARCH}'"; exit 1 ;; \
esac && \
cd /tmp && \
tar xvzf trivy.tar.gz
FROM ghcr.io/dockhippie/alpine:3.20
ENTRYPOINT [""]
RUN apk update && \
apk upgrade && \
apk add git rpm && \
rm -rf /var/cache/apk/*
COPY --from=build /tmp/trivy /usr/bin/