-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (57 loc) · 1.71 KB
/
Dockerfile
File metadata and controls
66 lines (57 loc) · 1.71 KB
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
# Use Alpine Linux for minimal image size
FROM alpine:latest
# Install system dependencies
RUN apk add --no-cache \
# Core tools
git \
curl \
wget \
unzip \
tar \
gzip \
# Build essentials (needed for tree-sitter and LSPs)
build-base \
gcc \
g++ \
make \
cmake \
# Neovim
neovim \
neovim-doc \
# Search tools (for telescope)
ripgrep \
fd \
# Node.js (many plugins and LSPs need it)
nodejs \
npm \
# Python (for some plugins)
python3 \
py3-pip \
# Lazygit (based on your lazygit plugin)
lazygit
# Install Go 1.25
RUN wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz \
&& rm go1.25.0.linux-amd64.tar.gz
# Set Go environment variables
ENV PATH="/usr/local/go/bin:${PATH}" \
GOPATH="/root/go" \
GOBIN="/root/go/bin"
# Add GOBIN to PATH
ENV PATH="${GOBIN}:${PATH}"
# Create .config directory
RUN mkdir -p /root/.config
# Copy your nvim configuration
COPY . /root/.config/nvim/
# Set working directory
WORKDIR /root
# Create a script to install plugins on first run
RUN echo '#!/bin/sh' > /usr/local/bin/setup-nvim.sh \
&& echo 'if [ ! -d "/root/.local/share/nvim/lazy" ]; then' >> /usr/local/bin/setup-nvim.sh \
&& echo ' echo "Installing Neovim plugins..."' >> /usr/local/bin/setup-nvim.sh \
&& echo ' nvim --headless "+Lazy! sync" +qa' >> /usr/local/bin/setup-nvim.sh \
&& echo ' echo "Plugins installed!"' >> /usr/local/bin/setup-nvim.sh \
&& echo 'fi' >> /usr/local/bin/setup-nvim.sh \
&& chmod +x /usr/local/bin/setup-nvim.sh
# Default command runs setup script then opens a shell
CMD ["/bin/sh", "-c", "setup-nvim.sh && exec /bin/sh"]