Skip to content

Commit 187aac1

Browse files
committed
feat: Dockerfile for reproducible dev/ci environment
1 parent c72328a commit 187aac1

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ make colors-check
135135

136136
This is run in CI and ensures that generation was correct by re-running it and validating that no changes were made.
137137

138+
### Using the local container image
139+
140+
You can build and use the included container image to run the previous commands.
141+
142+
```sh
143+
docker build -t nvim-web-devicons:latest .
144+
docker run --rm -ti --user "`id -u`:`id -g`" -v "$(pwd):/host" -w /host nvim-web-devicons:latest make
145+
```
146+
138147
## Test
139148

140149
Run `:NvimWebDeviconsHiTest` to view the icons and their highlighting.

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM debian:stable-slim
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt-get update \
6+
&& apt-get install -y --no-install-recommends \
7+
make gcc curl npm luarocks git \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
# Neovim
11+
RUN curl -L 'https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz' \
12+
| tar zx --directory /usr --strip-components=1
13+
14+
## luacheck
15+
RUN luarocks install luacheck
16+
17+
# stylua wrapper (npx to avoid cargo deps)
18+
RUN npm install --global @johnnymorganz/stylua-bin

0 commit comments

Comments
 (0)