|
1 |
| -FROM testbed/vim:24 |
| 1 | +FROM testbed/vim:24 AS build-vim |
2 | 2 |
|
3 |
| -# Add packages we need. |
4 |
| -# |
5 |
| -# We need most packages for installing Python. |
6 |
| -# We need nodejs for pyright. |
| 3 | +# Install tools for Vim testing. |
| 4 | +# We have a layer here so we rebuild Vim and Neovim less frequently. |
| 5 | +# Installing the Vim versions is the slowest build step. |
| 6 | +RUN install_vim -tag v8.0.0027 -build \ |
| 7 | + -tag v9.0.0297 -build \ |
| 8 | + -tag neovim:v0.8.0 -build |
| 9 | + |
| 10 | +RUN apk --update add git \ |
| 11 | + && git clone https://github.com/junegunn/vader.vim /vader \ |
| 12 | + && cd /vader \ |
| 13 | + && git checkout c6243dd81c98350df4dec608fa972df98fa2a3af |
| 14 | + |
| 15 | +FROM python:3.10-alpine |
| 16 | + |
| 17 | +# Copy shared libraries needed for Neovim. |
| 18 | +COPY --from=build-vim /usr/lib/libluv.so.* /usr/lib/ |
| 19 | +COPY --from=build-vim /usr/lib/libuv.so.* /usr/lib/ |
| 20 | +COPY --from=build-vim /usr/lib/libmsgpackc.so.* /usr/lib/ |
| 21 | +COPY --from=build-vim /usr/lib/libtermkey.so.* /usr/lib/ |
| 22 | +COPY --from=build-vim /usr/lib/libunibilium.so.* /usr/lib/ |
| 23 | +COPY --from=build-vim /usr/lib/libluajit-5.1.so.* /usr/lib/ |
| 24 | +COPY --from=build-vim /usr/lib/lua /usr/lib/lua |
| 25 | +COPY --from=build-vim /vim-build /vim-build |
| 26 | +COPY --from=build-vim /vader /vader |
| 27 | + |
| 28 | +# Install scripting tools for test scripts. |
| 29 | +# We need nodejs for running pyright. |
7 | 30 | ENV PACKAGES="\
|
8 | 31 | bash \
|
9 |
| - curl \ |
10 |
| - git \ |
11 |
| - build-base \ |
12 |
| - patch \ |
13 |
| - zlib-dev \ |
14 |
| - libffi-dev \ |
15 |
| - linux-headers \ |
16 |
| - readline-dev \ |
17 |
| - openssl \ |
18 |
| - nodejs \ |
19 |
| - openssl-dev \ |
20 |
| - sqlite-dev \ |
21 |
| - bzip2-dev \ |
22 |
| - python3 \ |
23 |
| - py3-pip \ |
24 | 32 | grep \
|
25 | 33 | sed \
|
| 34 | + nodejs \ |
26 | 35 | "
|
27 | 36 | RUN apk --update add $PACKAGES && \
|
28 | 37 | rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
|
29 | 38 |
|
30 |
| -# Install tools for Python testing. |
31 |
| -ENV PATH=/root/.pyenv/shims:/root/.pyenv/bin:$PATH |
32 |
| - |
33 |
| -# Switch to the /root dir copy the .python-version from the project. |
| 39 | +# Switch to the /root dir for setting up the project. |
34 | 40 | WORKDIR /root
|
35 | 41 |
|
36 |
| -# Install tools for Vim testing. |
37 |
| -# We have a layer here so we rebuild Vim and Neovim less frequently. |
38 |
| -# Installing the Vim versions is the slowest build step. |
39 |
| -RUN install_vim -tag v8.0.0027 -build \ |
40 |
| - -tag v9.0.0297 -build \ |
41 |
| - -tag neovim:v0.8.0 -build |
42 |
| -RUN git clone https://github.com/junegunn/vader.vim vader && \ |
43 |
| - cd vader && git checkout c6243dd81c98350df4dec608fa972df98fa2a3af |
44 |
| - |
45 |
| -# Copy project files into the project for dependencies and such. |
46 |
| -COPY .python-version /root/ |
47 |
| - |
48 |
| -# Install the Python version we need with uv. |
49 |
| -# We have a layer here so we rebuild Python and install uv less frequently. |
50 |
| -# Installing Python with uv is slower than updating dependencies, but much |
51 |
| -# faster than installing the Vim and Neovim versions. |
52 |
| -RUN curl https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash \ |
53 |
| - && eval "$(pyenv init -)" \ |
54 |
| - && eval "$(pyenv virtualenv-init -)" \ |
55 |
| - && pyenv install \ |
56 |
| - && pip install uv |
| 42 | +# Install setuptools and uv for Python |
| 43 | +RUN pip install uv |
57 | 44 |
|
58 | 45 | # Sync dependencies and install the Python dependencies we need.
|
59 | 46 | # vim-vint is included here for running the Vim lint steps.
|
|
0 commit comments