Skip to content

Commit ccf9713

Browse files
committed
use targetplatform arg
1 parent cde5601 commit ccf9713

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile.heaptrack

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG TARGETPLATFORM
45

56
RUN apt update -y -q && apt upgrade -y -q && apt update -y -q && \
67
apt install -y -q \
@@ -19,11 +20,11 @@ RUN apt update -y -q && apt upgrade -y -q && apt update -y -q && \
1920
gawk \
2021
unzip
2122

22-
RUN if [ "$(uname -m)" = "arm64" ]; then \
23+
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
2324
curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux-aarch64.zip \
2425
; fi
2526

26-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
27+
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
2728
curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \
2829
; fi
2930

0 commit comments

Comments
 (0)