From 5b88cefe97868762686635b2b91cc986646d22ea Mon Sep 17 00:00:00 2001 From: Tim Stephenson <231503406+tstephen-nhs@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:47:50 +0000 Subject: [PATCH] chore: multi-platform support for asdf --- .devcontainer/Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 634c1daaf..7f638c961 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -44,9 +44,16 @@ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \ # Install ASDF RUN ASDF_VERSION=$(awk '!/^#/ && NF {print $1; exit}' /tmp/.tool-versions.asdf) && \ - wget -O /tmp/asdf.tar.gz https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-amd64.tar.gz; \ - tar -xvzf /tmp/asdf.tar.gz; \ - mv asdf /usr/bin + if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \ + wget -O /tmp/asdf.tar.gz "https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-arm64.tar.gz"; \ + else \ + wget -O /tmp/asdf.tar.gz "https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-amd64.tar.gz"; \ + fi && \ + tar -xzf /tmp/asdf.tar.gz -C /tmp && \ + mkdir -p /usr/bin && \ + mv /tmp/asdf /usr/bin/asdf && \ + chmod +x /usr/bin/asdf && \ + rm -rf /tmp/asdf.tar.gz # specify DOCKER_GID to force container docker group id to match host RUN if [ -n "${DOCKER_GID}" ]; then \