diff --git a/Dockerfile b/Dockerfile index 7311d3f1..98bfd3c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,18 @@ -FROM alpine:3.17.1 +FROM alpine:3.18 # checkov:skip=CKV_DOCKER_3: Not a service # checkov:skip=CKV_DOCKER_2: Not a service # checkov:skip=CKV2_DOCKER_2: Not a service -ARG BUILDARCH=amd64 +ARG BUILDARCH=386 RUN echo "linux_${BUILDARCH}" -RUN apk --no-cache add build-base git curl jq bash -RUN curl -s -k https://api.github.com/repos/bridgecrewio/yor/releases/latest \ + +RUN apk --no-cache add build-base git curl jq bash \ + && curl -s -k https://api.github.com/repos/bridgecrewio/yor/releases/latest \ | jq ".assets[] | select(.name | contains(\"linux_${BUILDARCH}\")) \ | .browser_download_url" -r \ - | awk '{print "curl -L -k " $0 " -o yor.tar.gz"}' | sh -RUN tar -xf yor.tar.gz -C /usr/bin/ && rm yor.tar.gz && chmod +x /usr/bin/yor && echo 'alias yor="/usr/bin/yor"' >> ~/.bashrc + | awk '{print "curl -L -k " $0 " -o yor.tar.gz"}' | sh \ + && tar -xf yor.tar.gz -C /usr/bin/ && rm yor.tar.gz && chmod +x /usr/bin/yor && echo 'alias yor="/usr/bin/yor"' >> ~/.bashrc + COPY entrypoint.sh /entrypoint.sh # Code file to execute when the docker container starts up (`entrypoint.sh`)