forked from NvChad/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (25 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG BASE_IMAGE=python:3.12-alpine
FROM $BASE_IMAGE
ARG GIT_AUTHOR_EMAIL
ARG GIT_AUTHOR_NAME
RUN apk add --no-cache git nodejs neovim neovim-doc ripgrep build-base curl \
stylua \
py3-lsp-server py3-isort black \
github-cli \
--update
# (These packages are not yet available in the main repositry.)
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ lua-language-server luarocks
# Check if both build args are provided, otherwise don't configure git.
RUN if [ -n "$GIT_AUTHOR_EMAIL" ] && [ -n "$GIT_AUTHOR_NAME" ]; then \
git config --global user.email "$GIT_AUTHOR_EMAIL" && \
git config --global user.name "$GIT_AUTHOR_NAME" \
; \
fi
RUN mkdir -p /root/.config/nvim
COPY . /root/.config/nvim
# Currently gives "nvim-treesitter[vim]: Error during compilation", but this can be ignored.
RUN nvim --headless +"Lazy! sync" +"Lazy! load nvim-treesitter" \
+"TSInstallSync! vim lua vimdoc markdown json yaml toml html css javascript typescript python" \
+qa!
WORKDIR /root/workspace
CMD ["nvim"]