Skip to content

Commit 5b88cef

Browse files
committed
chore: multi-platform support for asdf
1 parent c782588 commit 5b88cef

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \
4444

4545
# Install ASDF
4646
RUN ASDF_VERSION=$(awk '!/^#/ && NF {print $1; exit}' /tmp/.tool-versions.asdf) && \
47-
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; \
48-
tar -xvzf /tmp/asdf.tar.gz; \
49-
mv asdf /usr/bin
47+
if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
48+
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"; \
49+
else \
50+
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"; \
51+
fi && \
52+
tar -xzf /tmp/asdf.tar.gz -C /tmp && \
53+
mkdir -p /usr/bin && \
54+
mv /tmp/asdf /usr/bin/asdf && \
55+
chmod +x /usr/bin/asdf && \
56+
rm -rf /tmp/asdf.tar.gz
5057

5158
# specify DOCKER_GID to force container docker group id to match host
5259
RUN if [ -n "${DOCKER_GID}" ]; then \

0 commit comments

Comments
 (0)