Skip to content

Commit 67823bb

Browse files
committed
feat(docker): enhance yq installation with architecture detection
- Updates the Dockerfile to install yq using architecture detection for improved compatibility. - Removes the fixed installation path for yq and uses a conditional to choose the correct binary for amd64 or arm64 architectures. - Cleans up unnecessary comments and retains only essential dependency installation instructions.
1 parent 2a47dc7 commit 67823bb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ FROM ghcr.io/actions/actions-runner:2.327.1
22

33
USER root
44

5-
# Install required dependencies including yq and jq
5+
# Install required dependencies
66
RUN apt-get update && \
77
apt-get install -y --no-install-recommends \
88
wget \
99
curl \
1010
ca-certificates \
11-
jq \
1211
&& rm -rf /var/lib/apt/lists/*
1312

14-
# Install yq
15-
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && \
13+
# Install yq with architecture detection
14+
RUN ARCH=$(uname -m) && \
15+
YQ_ARCH=$([ "$ARCH" = "x86_64" ] && echo "amd64" || echo "arm64") && \
16+
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${YQ_ARCH} && \
1617
chmod +x /usr/local/bin/yq
1718

1819
WORKDIR /install

0 commit comments

Comments
 (0)