Skip to content

Commit

Permalink
use arm go version
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion committed Feb 12, 2024
1 parent ee1b974 commit 1fcc86f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update --fix-missing -y
RUN apt-get install -y build-essential git curl software-properties-common ca-certificates gnupg wget

ARG TARGETPLATFORM

# install go 1.21
RUN wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz
RUN tar -xvf go1.21.6.linux-amd64.tar.gz -C /usr/local
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
wget https://go.dev/dl/go1.21.6.linux-arm64.tar.gz; \
tar -xvf go1.21.6.linux-arm64.tar.gz -C /usr/local; \
else \
wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz; \
tar -xvf go1.21.6.linux-amd64.tar.gz -C /usr/local; \
fi

ENV PATH="/usr/local/go/bin:${PATH}"

RUN go install github.com/extism/cli/extism@latest
Expand All @@ -34,7 +42,7 @@ RUN rustup target add wasm32-unknown-unknown

# RUN apt-get install binaryen

ARG TARGETPLATFORM

RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
wget https://github.com/tinygo-org/tinygo/releases/download/v0.30.0/tinygo_0.30.0_arm64.deb; \
dpkg -i tinygo_0.30.0_arm64.deb; \
Expand Down

0 comments on commit 1fcc86f

Please sign in to comment.