Open fhperuchi opened 1 year ago
Hi @fhperuchi, thanks for the question! I'm far from an expert in Docker, but I believe the underlying issue is the same as #1049: We don't currently have pre-built binaries for ARM Linux (and I'm guessing that Docker on M1 uses ARM Linux by default since that's the architecture).
You should still be able to build from source—see the docs under "Development" here: https://docs.volta.sh/contributing/ You can use the volta-install.sh --release
script to build and install locally, if that makes sense. Happy to help with that step if you run into any issues.
Hello @fhperuchi you can use this repo to download arm64 prebuilt binaries.
This would be nice to have. I can't run my image locally 😢
Just ran in to this -- would love to use volta on linux + Arm
Hi @fhperuchi, thanks for the question! I'm far from an expert in Docker, but I believe the underlying issue is the same as #1049: We don't currently have pre-built binaries for ARM Linux (and I'm guessing that Docker on M1 uses ARM Linux by default since that's the architecture).
You should still be able to build from source—see the docs under "Development" here: https://docs.volta.sh/contributing/ You can use the
volta-install.sh --release
script to build and install locally, if that makes sense. Happy to help with that step if you run into any issues.
I'm trying to do exactly this, but with the current script I get this error:
7 28.91 Installing Volta locally after compiling with '--release'
7 28.91 Checking for existing Volta installation
7 28.93 Error: Releases for non x64 architectures are not currently supported.
7 28.93 Error: Releases for 'Linux' are not yet supported.
I'm not sure if I'm doing something wrong or if I misunderstood what you meant.
Hi @fhperuchi, thanks for the question! I'm far from an expert in Docker, but I believe the underlying issue is the same as #1049: We don't currently have pre-built binaries for ARM Linux (and I'm guessing that Docker on M1 uses ARM Linux by default since that's the architecture). You should still be able to build from source—see the docs under "Development" here: https://docs.volta.sh/contributing/ You can use the
volta-install.sh --release
script to build and install locally, if that makes sense. Happy to help with that step if you run into any issues.I'm trying to do exactly this, but with the current script I get this error:
7 28.91 Installing Volta locally after compiling with '--release'
7 28.91 Checking for existing Volta installation
7 28.93 Error: Releases for non x64 architectures are not currently supported.
7 28.93 Error: Releases for 'Linux' are not yet supported.
I'm not sure if I'm doing something wrong or if I misunderstood what you meant.
I have no idea why or what the actual problem is. I was trying to debug it by adding random print statements across the install scripts. I ended up adding echo "VOLTA_OS: $VOLTA_OS" > $(tty)
after line 62 in ./dev/unix/release.sh
. I can not imagine how this solves it, but it does. Apparently it still doesn't detect the OS version correctly as that variable is empty, but it did install properly in ~/.volta
.
bump! Any reason why aarch64 is not yet supported on Linux, but is supported on Mac?
Adding 'linux-aarch64' to volta-install.sh seems to work
bump! Any reason why aarch64 is not yet supported on Linux, but is supported on Mac?
Adding 'linux-aarch64' to volta-install.sh seems to work
For anyone coming to this thread as of 8 Jun 2024, volta-install.sh can be used to install Volta on aarch64 (if you pull from main or use a tag higher than 1.1.1)
However installing with
curl https://get.volta.sh | bash
Still does not work on a linux/aarch64 system or container as of version 1.1.1
But you can use docker in a few different ways,
You could specify linux/amd64 as the platform and then use the pre-compiled binary.
FROM --platform=linux/amd64 ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install curl -y && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
ENV VOLTA_HOME="/opt/volta"
ENV PATH="$VOLTA_HOME/bin:$PATH"
RUN curl https://get.volta.sh | bash
RUN volta install node
This may incur a slight performance decrease, but shouldn't be too noticable.
Or you could even compile the source and use it in another image.
FROM rust AS volta-binaries
WORKDIR /volta
RUN git clone --depth=1 https://github.com/volta-cli/volta .
RUN cargo build --release
## Build image
FROM ubuntu:24.04 AS volta-docker
ARG DEBIAN_FRONTEND=noninteractive
COPY --from=volta-binaries /volta/target/release/volta* /usr/local/bin/
RUN apt-get update && apt-get install curl -y && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
ENV VOLTA_HOME="/opt/volta"
ENV PATH="$VOLTA_HOME/bin:$PATH"
RUN volta setup
RUN volta install node
Seeing as I couldn't see a container available on Docker Hub, I have built some images for this (ubuntu or alpine, both in amd64 and aarch64 variants)
see https://github.com/michaelr0/volta-docker for details, feel free to use this either directly or as inspiration for your own Dockerfile.
Hello volta developers.
Do you know if it is possible to run volta inside a Docker container on a Mac M1 or AWS Graviton machines?
Docker container:
I got this error running the volta shell installer there. Could you help me? Is there a way to build it from source and have the aarch64 binaries available on these type of environments (Docker container running on Mac M1 and AWS Graviton hosts)?