diff --git a/Dockerfile b/Dockerfile old mode 100755 new mode 100644 index a569a72..5fb5217 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,27 @@ -## INSTALL ## -FROM rust +## BACKEND ## +# Parent Image +FROM debian -RUN rustup component add rust-src -RUN wget https://github.com/rust-lang/rust-analyzer/releases/download/2024-06-17/rust-analyzer-x86_64-unknown-linux-gnu.gz -O /tmp/rust-analyzer.gz -RUN gunzip -c /tmp/rust-analyzer.gz > /usr/bin/rust-analyzer -RUN chmod 755 /usr/bin/rust-analyzer +# 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 + +# Installing Rust +RUN ./rust.sh -y + +# 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 > /bin/rust-analyzer + +# Installing rust-analyzer +RUN chmod +x /bin/rust-analyzer ## RUNTIME ## -ENTRYPOINT ["/usr/bin/rust-analyzer"] +ENTRYPOINT ["/bin/rust-analyzer"] \ No newline at end of file diff --git a/rust-ls b/rust-ls index f337164..4bbfee9 100755 --- a/rust-ls +++ b/rust-ls @@ -1 +1,5 @@ -docker run -i --rm -u $(stat -c '%u:%g' .) -v "$PWD:$PWD:ro,z" -w "$PWD" rust-ls "$@" +docker run --rm -it \ + -u $(stat -c '%u:%g' .) \ + -v "$PWD:$PWD:ro,z" \ + -w "$PWD" \ + rust-ls "$@" \ No newline at end of file