Skip to content

Commit

Permalink
make the cache mount backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
alpetric committed Dec 31, 2024
1 parent eb9a876 commit af1efd6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lsp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ RUN pip3 install tornado python-lsp-jsonrpc ruff-lsp
COPY --from=denoland/deno:2.1.2 --chmod=755 /usr/bin/deno /usr/bin/deno

RUN mkdir -p /pyls/.cache
RUN ln -s /pyls/.cache /root/.cache

WORKDIR /pyls
COPY Pipfile .
Expand All @@ -56,9 +55,8 @@ RUN mkdir -p /tmp/monaco && chmod -R 777 /tmp/monaco
RUN cd /tmp/monaco && npm install --save-dev windmill-client

RUN chmod -R a+rX /usr/local && \
chmod -R a+rX /pyls && \
chmod -R a+rX /root/.cache
chmod -R a+rX /pyls

EXPOSE 3001

CMD ["python3", "pyls_launcher.py"]
CMD ["sh", "-c", "if [ -d /root/.cache ]; then export XDG_CACHE_HOME=/root/.cache && cp -r /pyls/.cache /root/.cache; fi && python3 pyls_launcher.py"]

0 comments on commit af1efd6

Please sign in to comment.