Skip to content

Commit cfe9fd9

Browse files
committed
Deal with ARCH mismatch for cloudflared install
1 parent e962c4b commit cfe9fd9

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

.devcontainer/almalinux/Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ RUN dnf config-manager --add-repo https://pkgs.tailscale.com/stable/rhel/9/tails
7272
&& systemctl enable tailscaled
7373

7474
# restore cloudflared install
75-
RUN curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
75+
RUN ARCH=$( [ "$ARCH" = "amd64" ] && echo "x86_64" || { [ "$ARCH" = "arm64" ] && echo "aarch64" || echo "$ARCH"; } ) \
76+
&& curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
7677
&& dnf install -y \
7778
/tmp/cloudflared.rpm \
7879
&& dnf clean all \

.devcontainer/centos/Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ RUN dnf config-manager --add-repo https://pkgs.tailscale.com/stable/centos/9/tai
7070
&& systemctl enable tailscaled
7171

7272
# restore cloudflared install
73-
RUN curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
73+
RUN ARCH=$( [ "$ARCH" = "amd64" ] && echo "x86_64" || { [ "$ARCH" = "arm64" ] && echo "aarch64" || echo "$ARCH"; } ) \
74+
&& curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
7475
&& dnf install -y \
7576
/tmp/cloudflared.rpm \
7677
&& dnf clean all \

.devcontainer/fedora-eln/Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ RUN dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable
6767
&& systemctl enable tailscaled
6868

6969
# restore cloudflared install
70-
RUN curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
70+
RUN ARCH=$( [ "$ARCH" = "amd64" ] && echo "x86_64" || { [ "$ARCH" = "arm64" ] && echo "aarch64" || echo "$ARCH"; } ) \
71+
&& curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
7172
&& dnf install -y \
7273
/tmp/cloudflared.rpm \
7374
&& dnf clean all \

.devcontainer/fedora/Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ RUN dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable
6969
&& systemctl enable tailscaled
7070

7171
# restore cloudflared install
72-
RUN curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
72+
RUN ARCH=$( [ "$ARCH" = "amd64" ] && echo "x86_64" || { [ "$ARCH" = "arm64" ] && echo "aarch64" || echo "$ARCH"; } ) \
73+
&& curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
7374
&& dnf install -y \
7475
/tmp/cloudflared.rpm \
7576
&& dnf clean all \

.devcontainer/ubi9/Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ RUN dnf config-manager --add-repo https://pkgs.tailscale.com/stable/rhel/9/tails
7373
&& systemctl enable tailscaled
7474

7575
# restore cloudflared install
76-
RUN curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
76+
RUN ARCH=$( [ "$ARCH" = "amd64" ] && echo "x86_64" || { [ "$ARCH" = "arm64" ] && echo "aarch64" || echo "$ARCH"; } ) \
77+
&& curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}.rpm -o /tmp/cloudflared.rpm \
7778
&& dnf install -y \
7879
/tmp/cloudflared.rpm \
7980
&& dnf clean all \

0 commit comments

Comments
 (0)