aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.tex
blob: 54654e0af73e71e824544a52f3b1a8bdbee6d89d (plain)
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
FROM alpine:edge AS base
WORKDIR /root
SHELL ["/bin/sh", "-c"]

RUN apk add --no-cache git \
                       lazygit \
                       neovim \
                       man-pages \
                       alpine-sdk \
                       bash \
                       eza \
                       ncurses \
                       util-linux-misc \
                       curl \
                       --update

# install deps needed by neovim
RUN apk add --no-cache wget \
                       gzip \
                       neovim-doc \
                       ripgrep \
                       rustup \
                       python3 \
                       openjdk21 \
                       openjdk17 \
                       gradle \
                       go \
                       dotnet8-sdk \
                       clang19-extra-tools \
                       nodejs \
                       npm 

# install TeX
RUN apk add --no-cache texlive \
                       texlive-binextra \
                       texmf-dist-fontutils \
                       texmf-dist-fontsrecommended \
                       texmf-dist-langenglish \
                       texmf-dist-langeuropean \
                       texmf-dist-latexextra \
                       texmf-dist-latexrecommended \
                       texmf-dist-pictures \
                       texmf-dist-plaingeneric 

# pre-download lazy.nvim
RUN git clone --filter=blob:none https://github.com/folke/lazy.nvim.git --branch=stable /root/.local/share/nvim/lazy/lazy.nvim

# set up Rust
RUN rustup-init -y --default-toolchain none && /root/.cargo/bin/rustup toolchain install nightly --allow-downgrade --profile minimal --component rustfmt,rust-src,clippy && echo -e "[unstable]\ngc = true" > /root/.cargo/config.toml

# copy config files
COPY .bashrc .bashrc
COPY . .config/nvim

FROM base
SHELL ["/bin/bash", "-c"]
WORKDIR /root
RUN nvim --headless +"Lazy! sync" +qa; rm -rf /root/.cache

# symlink the clangd executable, since it can't be installed with mason
RUN ln -sf /usr/bin/clangd /root/.local/share/nvim/mason/bin/clangd

ENTRYPOINT ["/bin/bash"]

# vi: ft=dockerfile