Skip to content

Commit

Permalink
docker/jq: macs give aarch64 as machine within container
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed Jun 27, 2024
1 parent f23f235 commit b43a113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/jq/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ WORKDIR /root
# Download a jq binary and do a checksum check on it
COPY jq-linux-amd64.sha256 jq-linux-arm64.sha256 ./
RUN arch=$(uname -m) && \
{ [ "$arch" != "x86_64" ] || arch="amd64"; } && \
{ [ "$arch" != "x86_64" ] || arch="amd64"; [ "$arch" != "aarch64" ] || arch="arm64"; } && \
curl -L -o jq-linux-$arch \
https://github.com/stedolan/jq/releases/download/jq-1.7.1/jq-linux-$arch && \
sha256sum -c jq-linux-$arch.sha256

# install jq
RUN arch=$(uname -m) && \
{ [ "$arch" != "x86_64" ] || arch="amd64"; } && \
{ [ "$arch" != "x86_64" ] || arch="amd64"; [ "$arch" != "aarch64" ] || arch="arm64"; } && \
chmod a+x jq-linux-$arch && cp jq-linux-$arch /usr/local/bin/jq

CMD ["bash"]
Expand Down

0 comments on commit b43a113

Please sign in to comment.