Skip to content

Instantly share code, notes, and snippets.

@liropa
Created January 23, 2024 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liropa/7d9fecc239cb3b4909f06265b737604c to your computer and use it in GitHub Desktop.
Save liropa/7d9fecc239cb3b4909f06265b737604c to your computer and use it in GitHub Desktop.
Adding Volta (v1.1.1) from source to Docker Image
# Use the official Rust image as a base
FROM rust:1.57
# Set the working directory
WORKDIR /usr/src/volta
# Clone the Volta repository
RUN git clone --branch v1.1.1 https://github.com/volta-cli/volta.git .
# Build Volta
RUN cargo build --release
# Add the Volta bin folder to the PATH
ENV PATH="/usr/src/volta/target/release:${PATH}"
# Setup volta
RUN volta setup
# Add managed packages from Volta to the PATH
ENV PATH="/root/.volta/bin:${PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment