From 885d6b26ad76d92b0f679a2f605f85dbcd9a311e Mon Sep 17 00:00:00 2001 From: Miguel Berrio Date: Sun, 15 May 2022 17:32:00 +0200 Subject: [PATCH] feat(rust-analyzer): use package from alpine repo --- servers/rust_analyzer/Dockerfile | 20 +++++++------------- servers/rust_analyzer/docker_entrypoint.sh | 5 ----- 2 files changed, 7 insertions(+), 18 deletions(-) delete mode 100755 servers/rust_analyzer/docker_entrypoint.sh diff --git a/servers/rust_analyzer/Dockerfile b/servers/rust_analyzer/Dockerfile index 0e3fa0e..630f97b 100644 --- a/servers/rust_analyzer/Dockerfile +++ b/servers/rust_analyzer/Dockerfile @@ -1,20 +1,14 @@ FROM alpine:3.15.0 -RUN apk add --no-cache \ +RUN apk add -U --no-cache \ bash \ curl \ - gcc + gcc \ + cargo \ + && rm -rf /var/cache/apk/* -RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/sh.rustup.rs \ - && chmod +x /tmp/sh.rustup.rs \ - && /tmp/sh.rustup.rs --default-toolchain none -y \ - && rm -rf /tmp/sh.rustup.rs \ - && . "$HOME"/.cargo/env \ - && rustup toolchain install nightly \ - && rustup component add rust-analyzer-preview +RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories -COPY ./docker_entrypoint.sh /docker_entrypoint.sh +RUN apk add rust-analyzer@testing -ENTRYPOINT [ "/docker_entrypoint.sh" ] - -CMD [ "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-musl/bin/rust-analyzer" ] +CMD [ "rust-analyzer" ] diff --git a/servers/rust_analyzer/docker_entrypoint.sh b/servers/rust_analyzer/docker_entrypoint.sh deleted file mode 100755 index b38ea25..0000000 --- a/servers/rust_analyzer/docker_entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -e - -source /root/.cargo/env \ - && exec "$@"