Skip to content

Commit

Permalink
feat(docker): multiplatform buildx containers (#352)
Browse files Browse the repository at this point in the history
* multiplatform buildx containers

* remove cruft

* Update Dockerfile

Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>

---------

Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
  • Loading branch information
JamesWoolfenden and gruebel committed Jul 4, 2023
1 parent 0472721 commit 423f461
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ FROM alpine:3.17.1
# checkov:skip=CKV_DOCKER_2: Not a service
# checkov:skip=CKV2_DOCKER_2: Not a service

ARG BUILDARCH=amd64
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 | jq '.assets[] | select(.name | contains("linux_386")) | select(.content_type | contains("gzip")) | .browser_download_url' -r | awk '{print "curl -L -k " $0 " -o /usr/bin/yor.tar.gz"}' | sh
RUN tar -xf /usr/bin/yor.tar.gz -C /usr/bin/ && rm /usr/bin/yor.tar.gz && chmod +x /usr/bin/yor && echo 'alias yor="/usr/bin/yor"' >> ~/.bashrc
RUN 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
COPY entrypoint.sh /entrypoint.sh

# Code file to execute when the docker container starts up (`entrypoint.sh`)
Expand Down
12 changes: 0 additions & 12 deletions Dockerfile.arm64

This file was deleted.

0 comments on commit 423f461

Please sign in to comment.