Updated docker config

This commit is contained in:
Maddox Werts 2025-01-19 09:27:47 -05:00
parent 008ba87a49
commit 8d7c1e392b
2 changed files with 29 additions and 8 deletions

31
Dockerfile Executable file → Normal file
View file

@ -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"]

View file

@ -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 "$@"