diff --git a/docker/cargo/Dockerfile b/docker/cargo/Dockerfile new file mode 100644 index 0000000..210fc08 --- /dev/null +++ b/docker/cargo/Dockerfile @@ -0,0 +1,24 @@ +## BACKEND ## +# Parent Image +FROM debian + +# Creating directories +WORKDIR /tmp + +# Installing Deps +RUN apt update -y +RUN apt install -y wget build-essential libssl-dev pkg-config + +# Downloading Rust Install Script +RUN wget https://sh.rustup.rs -O rust.sh +RUN chmod +x rust.sh + +# Switching to a User +RUN useradd -m rustacean +USER rustacean + +# Installing Rust +RUN ./rust.sh -y + +## RUNTIME ## +ENTRYPOINT ["/home/rustacean/.cargo/bin/cargo"] \ No newline at end of file diff --git a/docker/rust-analyzer/Dockerfile b/docker/rust-analyzer/Dockerfile new file mode 100644 index 0000000..ba4b3af --- /dev/null +++ b/docker/rust-analyzer/Dockerfile @@ -0,0 +1,31 @@ +## BACKEND ## +# Parent Image +FROM debian + +# Creating directories +WORKDIR /tmp + +# Installing Deps +RUN apt update -y +RUN apt install -y wget build-essential libssl-dev pkg-config + +# Downloading Rust Install Script +RUN wget https://sh.rustup.rs -O rust.sh +RUN chmod +x rust.sh + +# Downloading Rust-Analyzer +RUN wget https://github.com/rust-lang/rust-analyzer/releases/download/2025-01-13/rust-analyzer-x86_64-unknown-linux-gnu.gz -O rust-analyzer.gz +RUN gunzip -c rust-analyzer.gz > /usr/local/bin/rust-analyzer + +# Installing rust-analyzer +RUN chmod +x /usr/local/bin/rust-analyzer + +# Switching to a User +RUN useradd -m rustacean +USER rustacean + +# Installing Rust +RUN ./rust.sh -y + +## RUNTIME ## +ENTRYPOINT ["/usr/local/bin/rust-analyzer"] \ No newline at end of file