mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
add signature verification to install.sh (#2941)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
FROM alpine:3.6@sha256:66790a2b79e1ea3e1dabac43990c54aca5d1ddf268d9a5a0285e4167c8b24475
|
||||
RUN apk update && apk add python3 wget unzip make ca-certificates jq
|
||||
FROM alpine:3.6
|
||||
RUN apk update && apk add python3 wget curl unzip make ca-certificates
|
||||
RUN curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64" && \
|
||||
mv cosign-linux-amd64 /usr/local/bin/cosign && \
|
||||
chmod +x /usr/local/bin/cosign
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
FROM alpine as certs
|
||||
RUN apk update && apk add ca-certificates
|
||||
|
||||
# note: using qemu with a multi-arch image results in redirects not working with wget
|
||||
# so let docker pull the image that matches the hosts architecture first and then pull the correct asset
|
||||
FROM busybox:1.36.1-musl
|
||||
|
||||
RUN ARCH=$(uname -m) && \
|
||||
if [ "$ARCH" = "x86_64" ]; then \
|
||||
COSIGN_ARCH="amd64"; \
|
||||
elif [ "$ARCH" = "aarch64" ]; then \
|
||||
COSIGN_ARCH="arm64"; \
|
||||
else \
|
||||
echo "Unsupported architecture: $ARCH" && exit 1; \
|
||||
fi && \
|
||||
echo "Downloading cosign for $COSIGN_ARCH" && \
|
||||
wget https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-${COSIGN_ARCH} && \
|
||||
mv cosign-linux-${COSIGN_ARCH} /bin/cosign && \
|
||||
chmod +x /bin/cosign
|
||||
|
||||
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
|
||||
@@ -1,2 +1,5 @@
|
||||
FROM ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba
|
||||
RUN apt update -y && apt install make python3 curl unzip jq -y
|
||||
FROM --platform=linux/amd64 ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba
|
||||
RUN apt update -y && apt install make python3 curl unzip -y
|
||||
RUN LATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ") && \
|
||||
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_VERSION}_amd64.deb" && \
|
||||
dpkg -i cosign_${LATEST_VERSION}_amd64.deb
|
||||
|
||||
Reference in New Issue
Block a user