Skip to content

Commit b321afc

Browse files
multi arch install qsv
1 parent 8e597f3 commit b321afc

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

kdiff-snapshots/Dockerfile

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM bitnami/kubectl:latest AS kubectl
33

44
# actual image
55
FROM ghcr.io/oguzhan-yilmaz/steampipe-powerpipe-kubernetes--steampipe:latest
6-
6+
ARG TARGETPLATFORM
77
ENV DEBIAN_FRONTEND=noninteractive
88
SHELL ["/bin/bash", "-c"]
99
ENV QSV_VER="8.1.1"
@@ -15,26 +15,30 @@ RUN apt-get update -y \
1515
&& echo "deb [signed-by=/usr/share/keyrings/qsv-deb.gpg] https://dathere.github.io/qsv-deb-releases ./" | tee /etc/apt/sources.list.d/qsv.list \
1616
&& apt-get update -y \
1717
&& apt-get install -y \
18-
inotify-tools \
19-
curl git unzip jq \
18+
inotify-tools ca-certificates \
19+
curl git unzip jq \
2020
&& apt-get clean \
2121
&& rm -rf /var/lib/apt/lists/*
2222

2323

2424

25-
26-
RUN set -x \
27-
&& export QSV_VER="8.1.1" \
28-
&& export QSV_DOWNLOAD_URL="https://github.com/dathere/qsv/releases/download/${QSV_VER}/qsv-${QSV_VER}-aarch64-unknown-linux-gnu.zip" \
29-
&& echo "QSV_DOWNLOAD_URL=$QSV_DOWNLOAD_URL" \
30-
&& wget "$QSV_DOWNLOAD_URL" \
31-
&& ls -R \
32-
&& unzip qsv-${QSV_VER}-aarch64-unknown-linux-gnu.zip \
33-
&& mv qsv /usr/local/bin/ \
34-
&& chmod +x /usr/local/bin/qsv \
35-
&& rm qsv-${QSV_VER}-aarch64-unknown-linux-gnu.zip
36-
37-
25+
# Install qsv depending on architecture
26+
RUN set -eux; \
27+
echo "Detected platform: ${TARGETPLATFORM}"; \
28+
if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
29+
apt-get install -y qsv; \
30+
elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
31+
QSV_VER="8.1.1"; \
32+
QSV_DOWNLOAD_URL="https://github.com/dathere/qsv/releases/download/${QSV_VER}/qsv-${QSV_VER}-aarch64-unknown-linux-gnu.zip"; \
33+
echo "Downloading QSV from $QSV_DOWNLOAD_URL"; \
34+
wget -q "$QSV_DOWNLOAD_URL"; \
35+
unzip "qsv-${QSV_VER}-aarch64-unknown-linux-gnu.zip"; \
36+
mv qsv /usr/local/bin/; \
37+
chmod +x /usr/local/bin/qsv; \
38+
rm "qsv-${QSV_VER}-aarch64-unknown-linux-gnu.zip"; \
39+
else \
40+
echo "Unsupported platform: ${TARGETPLATFORM}" && exit 1; \
41+
fi
3842

3943
# # Install qsv
4044
# RUN echo "architecture = $(dpkg --print-architecture)" \

0 commit comments

Comments
 (0)