Created
January 23, 2024 17:04
-
-
Save liropa/7d9fecc239cb3b4909f06265b737604c to your computer and use it in GitHub Desktop.
Adding Volta (v1.1.1) from source to Docker Image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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