Skip to content

Commit

Permalink
pack correct binary into Docker image (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
gruebel committed Aug 30, 2023
1 parent 71ade12 commit 3e30ff3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions 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`)
Expand Down

0 comments on commit 3e30ff3

Please sign in to comment.