Skip to content

Commit

Permalink
feat: add oras to sysdig images
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiola committed Oct 30, 2023
1 parent 186c419 commit ed5e733
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions containers/sysdig/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ ARG TARGETARCH

ARG DOCKER_VERSION=24.0.7

ARG ORAS_VERSION=1.1.0
ARG ORAS_CHECKSUM=e09e85323b24ccc8209a1506f142e3d481e6e809018537c6b3db979c891e6ad7
ARG ORAS_CHECKSUM_ARM=e450b081f67f6fda2f16b7046075c67c9a53f3fda92fd20ecc59873b10477ab4

ARG SYSDIG_SCANNER_VERSION=1.6.1
ARG SYSDIG_SCANNER_CHECKSUM=e94d9b10a04f98bd1821c5c51f975c804a894a9dd73017d9e8f6d912f7be297d
ARG SYSDIG_SCANNER_CHECKSUM_ARM=a66931454e87f44d8b85058c989efae178a8374ad5764777c3222f3d68e00347
Expand All @@ -15,6 +19,23 @@ RUN arch="$(uname -m)"; \
tar -xvf /tmp/docker.tgz --no-same-owner -C /tmp/ && \
mv -v /tmp/docker/docker /usr/local/bin/

# install ORAS
RUN wget --compression=auto "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_${TARGETARCH}.tar.gz" -O /tmp/oras.tar.gz && \
case "${TARGETARCH}" in \
'amd64') \
checksum="${ORAS_CHECKSUM}"; \
;; \
'arm64') \
checksum="${ORAS_CHECKSUM_ARM}"; \
;; \
*) echo >&2 "error: unsupported architecture ($TARGETARCH)"; exit 1; ;; \
esac; \
echo "${checksum} /tmp/oras.tar.gz" | sha256sum -c - && \
mkdir -p /tmp/oras-install/ && \
tar -zxf /tmp/oras.tar.gz -C /tmp/oras-install/ && \
mv /tmp/oras-install/oras /usr/local/bin/ && \
rm -rf /tmp/oras.tar.gz /tmp/oras-install

# install sysdig-cli-scanner https://docs.sysdig.com/en/docs/installation/sysdig-secure/install-vulnerability-cli-scanner/
RUN wget --compression=auto https://download.sysdig.com/scanning/bin/sysdig-cli-scanner/${SYSDIG_SCANNER_VERSION}/linux/${TARGETARCH}/sysdig-cli-scanner -O /tmp/sysdig-cli-scanner && \
case "${TARGETARCH}" in \
Expand Down

0 comments on commit ed5e733

Please sign in to comment.