Add clangd server image

This commit is contained in:
uazo 2021-12-08 16:46:40 +00:00
parent 45f774099d
commit 42751a4808
3 changed files with 32 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/.vs
images/github-runner/.env
images/privoxy/privoxy.conf.save
images/remote-index/bromite.idx

View File

@ -0,0 +1,20 @@
FROM debian:stable
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y cron python3 python3-requests unzip nginx-light wget unzip
# We install pip, jinja and delete pip afterwards in same step to keep final
# image size small.
RUN apt-get install -y --no-install-recommends python3-pip && \
pip3 install j2cli && apt-get remove -y python3-pip && apt-get autoremove -y
RUN rm -rf /var/www/html/*
#WORKDIR "/"
RUN wget https://github.com/clangd/clangd/releases/download/snapshot_20211205/clangd_indexing_tools-linux-snapshot_20211205.zip && \
unzip clangd_indexing_tools-linux-snapshot_20211205.zip && \
rm clangd_indexing_tools-linux-snapshot_20211205.zip
ADD bromite.idx .
ADD entry_point.sh .
RUN chmod +x ./entry_point.sh
ENTRYPOINT ["./entry_point.sh"]

View File

@ -0,0 +1,11 @@
#!/bin/bash
until ./clangd_snapshot_20211205/bin/clangd-index-server \
/bromite.idx /home/lg/working_dir/chromium/src \
--server-address="0.0.0.0:50051" \
--limit-results=99999999999
do
echo "Restarting index-server. Exited with code $?." >&2
sleep 1
done