2024-01-19 23:02:50 +00:00
|
|
|
FROM python:3.9.18-alpine3.19
|
2023-07-03 17:18:29 +00:00
|
|
|
MAINTAINER Elia El Lazkani <git@lazkani.io>
|
2023-07-03 16:48:20 +00:00
|
|
|
|
2023-07-04 17:21:12 +00:00
|
|
|
COPY scripts/* /usr/local/bin/
|
|
|
|
|
2024-01-19 23:14:03 +00:00
|
|
|
RUN apk update && apk upgrade && apk add --virtual .build-deps curl && \
|
2024-01-19 22:48:43 +00:00
|
|
|
export ORAS_VERSION=$(wget -qO - "https://api.github.com/repos/oras-project/oras/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') && \
|
2023-07-03 21:12:34 +00:00
|
|
|
curl -LO "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz" && \
|
|
|
|
mkdir -p oras-install/ && \
|
|
|
|
tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C oras-install/ && \
|
|
|
|
mv oras-install/oras /usr/local/bin/ && \
|
|
|
|
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/ && \
|
2023-07-03 16:48:20 +00:00
|
|
|
export TRIVY_VERSION=$(wget -qO - "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') && \
|
|
|
|
echo $TRIVY_VERSION && \
|
|
|
|
curl -LO "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" && \
|
|
|
|
mkdir -p trivy-install && \
|
|
|
|
tar -zxf trivy_${TRIVY_VERSION}_*.tar.gz -C trivy-install/ && \
|
|
|
|
mv trivy-install /opt/trivy && \
|
|
|
|
ln -s /opt/trivy/trivy /usr/local/bin/trivy && \
|
2024-01-19 23:14:03 +00:00
|
|
|
apk del .build-deps && \
|
|
|
|
rm -vrf /var/cache/apk/*
|