Skip to content

feat: Dockerfile for reproducible dev/ci environment#632

Open
fjfnaranjo wants to merge 1 commit intonvim-tree:masterfrom
fjfnaranjo:patch-3
Open

feat: Dockerfile for reproducible dev/ci environment#632
fjfnaranjo wants to merge 1 commit intonvim-tree:masterfrom
fjfnaranjo:patch-3

Conversation

@fjfnaranjo
Copy link
Copy Markdown
Contributor

For consideration. Mentioned in #629 .

Built by chatgpt from the steps:

#!/bin/sh
apt update && apt install -y curl wget npm luarocks
mkdir /tmp/nvim
wget -O /tmp/nvim/nvim-linux-x86_64.tar.gz https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz
cd /tmp/nvim || exit
tar xzf nvim-linux-x86_64.tar.gz
cd nvim-linux-x86_64 || exit
cp -r bin/* /usr/local/bin/
cp -r lib/* /usr/local/lib/
cp -r share/* /usr/local/share/
cd /host || exit
luarocks install luacheck
npx --yes @johnnymorganz/stylua-bin --help
printf '#!/bin/sh\nnpx --yes @johnnymorganz/stylua-bin $@\n' > /usr/local/bin/stylua
chmod +x /usr/local/bin/stylua

Verified running:

podman build -t nvim-web-devicons .
podman run --rm -ti -v "$(pwd):/host" -w /host nvim-web-devicons:latest make

@alex-courtis
Copy link
Copy Markdown
Member

This is fantastic! I'll give it a go shortly...

@alex-courtis
Copy link
Copy Markdown
Member

After running a make, the generated files are all owned by root and thus no longer editable.

Perhaps we could set the user/group ids similar to https://github.com/alex-courtis/way-displays/blob/675910d3378f6cf85cc3b413a0536ab7a3d1ba84/GNUmakefile#L113-L120

: ; find . -ls | grep -v ".git"
 48370245      4 drwxr-xr-x   7 alex     alex         4096 Apr 10 09:23 .
 48398785      4 -rw-r--r--   1 alex     alex          167 Apr 10 08:51 ./.luacheckrc
 48398787      4 -rw-r--r--   1 alex     alex          703 Apr 10 08:51 ./.pre-commit-config.yaml
 49036725      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 08:51 ./scripts
 49036728      8 -rw-r--r--   1 alex     alex         4794 Apr 10 08:51 ./scripts/generate.lua
 49036727      4 -rwxr-xr-x   1 alex     alex          734 Apr 10 08:51 ./scripts/filetypes.sh
 49036726      4 -rw-r--r--   1 alex     alex         1181 Apr 10 08:51 ./scripts/align.lua
 49036729      4 -rw-r--r--   1 alex     alex          390 Apr 10 08:51 ./scripts/sort_filetypes.lua
 49036601      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 08:51 ./plugin
 49036620      4 -rw-r--r--   1 alex     alex          214 Apr 10 08:51 ./plugin/nvim-web-devicons.vim
 48398788      4 -rw-r--r--   1 alex     alex          140 Apr 10 08:51 ./.stylua.toml
 48398791      4 -rw-r--r--   1 alex     alex         1066 Apr 10 08:51 ./LICENSE
 48394329      4 -rw-r--r--   1 alex     alex          187 Apr 10 08:51 ./.editorconfig
 48398795      4 -rw-r--r--   1 alex     alex          983 Apr 10 08:51 ./Dockerfile
 48398789      4 -rw-r--r--   1 alex     alex           36 Apr 10 08:51 ./.styluaignore
 48398790      8 -rw-r--r--   1 alex     alex         4814 Apr 10 08:51 ./CONTRIBUTING.md
 48398792      4 -rw-r--r--   1 alex     alex         1354 Apr 10 08:51 ./Makefile
 49036358      4 drwxr-xr-x   3 alex     alex         4096 Apr 10 08:51 ./lua
 49036401      4 drwxr-xr-x   4 alex     alex         4096 Apr 10 09:23 ./lua/nvim-web-devicons
 49036468      4 -rw-r--r--   1 alex     alex          448 Apr 10 08:51 ./lua/nvim-web-devicons/icons-light.lua
 49036473      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 09:23 ./lua/nvim-web-devicons/light
 49036936      4 -rw-r--r--   1 alex     alex          915 Apr 10 09:23 ./lua/nvim-web-devicons/light/icons_by_desktop_environment.lua
 49036427      8 -rw-r--r--   1 alex     alex         6876 Apr 10 09:23 ./lua/nvim-web-devicons/light/icons_by_operating_system.lua
 49036426     28 -rw-r--r--   1 alex     alex        27601 Apr 10 09:23 ./lua/nvim-web-devicons/light/icons_by_filename.lua
 49036425     60 -rw-r--r--   1 alex     alex        57709 Apr 10 09:23 ./lua/nvim-web-devicons/light/icons_by_file_extension.lua
 49036435      4 -rw-r--r--   1 alex     alex         1398 Apr 10 09:23 ./lua/nvim-web-devicons/light/icons_by_window_manager.lua
 49036944      8 -rw-r--r--   1 alex     alex         5188 Apr 10 09:23 ./lua/nvim-web-devicons/filetypes.lua
 49036438      8 -rw-r--r--   1 alex     alex         4991 Apr 10 08:51 ./lua/nvim-web-devicons/hi-test.lua
 49036439      4 -rw-r--r--   1 alex     alex          458 Apr 10 08:51 ./lua/nvim-web-devicons/icons-default.lua
 49036424      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 09:23 ./lua/nvim-web-devicons/default
 49036437      4 -rw-r--r--   1 alex     alex          801 Apr 10 09:23 ./lua/nvim-web-devicons/default/icons_by_desktop_environment.lua
 49036480      8 -rw-r--r--   1 alex     alex         6765 Apr 10 09:23 ./lua/nvim-web-devicons/default/icons_by_operating_system.lua
 49036942     28 -rw-r--r--   1 alex     alex        27498 Apr 10 09:23 ./lua/nvim-web-devicons/default/icons_by_filename.lua
 49036943     60 -rw-r--r--   1 alex     alex        57600 Apr 10 09:23 ./lua/nvim-web-devicons/default/icons_by_file_extension.lua
 49036493      4 -rw-r--r--   1 alex     alex         1289 Apr 10 09:23 ./lua/nvim-web-devicons/default/icons_by_window_manager.lua
 49036375     16 -rw-r--r--   1 alex     alex        12811 Apr 10 08:51 ./lua/nvim-web-devicons.lua
 48398786      4 -rw-r--r--   1 alex     alex          216 Apr 10 08:51 ./.luarc.json
 48398793     12 -rw-r--r--   1 alex     alex         9634 Apr 10 08:51 ./README.md
: ; docker run --rm -ti -v "$(pwd):/host" -w /host nvim-web-devicons:latest make
mkdir -p vim-colortemplate
curl -L https://github.com/lifepillar/vim-colortemplate/archive/refs/tags/v2.2.3.tar.gz | tar zx --directory vim-colortemplate --strip-components=1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   99k    0   99k    0     0   151k      0 --:--:-- --:--:-- --:--:--  151k
mkdir -p mini-align
curl -L https://github.com/echasnovski/mini.align/archive/refs/tags/v0.14.0.tar.gz | tar zx --directory mini-align --strip-components=1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 33114    0 33114    0     0  39514      0 --:--:-- --:--:-- --:--:-- 39514
rm -f lua/nvim-web-devicons/light/icons_by_*.lua
cp lua/nvim-web-devicons/default/icons_by_*.lua lua/nvim-web-devicons/light/
nvim \
	--clean \
	--headless \
	--cmd "set rtp^=vim-colortemplate" \
	--cmd "set rtp^=mini-align" \
	-c 'source scripts/generate.lua' \
	-c 'source scripts/align.lua' \
	-c 'source scripts/sort_filetypes.lua' \
	-c 'qall'
Generating cterm colors for dark background: icons_by_desktop_environment.lua... OK
Generating cterm colors for dark background: icons_by_file_extension.lua... OK
Generating cterm colors for dark background: icons_by_filename.lua... OK
Generating cterm colors for dark background: icons_by_operating_system.lua... OK
Generating cterm colors for dark background: icons_by_window_manager.lua... OK
Generating colors for light background: icons_by_desktop_environment.lua... OK
Generating colors for light background: icons_by_file_extension.lua... OK
Generating colors for light background: icons_by_filename.lua... OK
Generating colors for light background: icons_by_operating_system.lua... OK
Generating colors for light background: icons_by_window_manager.lua... OK
Aligning default/icons_by_desktop_environment.lua... OK
Aligning default/icons_by_file_extension.lua... OK
Aligning default/icons_by_filename.lua... OK
Aligning default/icons_by_operating_system.lua... OK
Aligning default/icons_by_window_manager.lua... OK
Aligning light/icons_by_desktop_environment.lua... OK
Aligning light/icons_by_file_extension.lua... OK
Aligning light/icons_by_filename.lua... OK
Aligning light/icons_by_operating_system.lua... OK
Aligning light/icons_by_window_manager.lua... OK
Sorting filetypes.lua... OK
stylua . --check
luacheck lua scripts
Checking lua/nvim-web-devicons.lua                OK
Checking lua/nvim-web-devicons/default/icons_by_desktop_environment.lua OK
Checking lua/nvim-web-devicons/default/icons_by_file_extension.lua OK
Checking lua/nvim-web-devicons/default/icons_by_filename.lua OK
Checking lua/nvim-web-devicons/default/icons_by_operating_system.lua OK
Checking lua/nvim-web-devicons/default/icons_by_window_manager.lua OK
Checking lua/nvim-web-devicons/filetypes.lua      OK
Checking lua/nvim-web-devicons/hi-test.lua        OK
Checking lua/nvim-web-devicons/icons-default.lua  OK
Checking lua/nvim-web-devicons/icons-light.lua    OK
Checking lua/nvim-web-devicons/light/icons_by_desktop_environment.lua OK
Checking lua/nvim-web-devicons/light/icons_by_file_extension.lua OK
Checking lua/nvim-web-devicons/light/icons_by_filename.lua OK
Checking lua/nvim-web-devicons/light/icons_by_operating_system.lua OK
Checking lua/nvim-web-devicons/light/icons_by_window_manager.lua OK
Checking scripts/align.lua                        OK
Checking scripts/generate.lua                     OK
Checking scripts/sort_filetypes.lua               OK

Total: 0 warnings / 0 errors in 18 files
./scripts/filetypes.sh
: ; find . -ls | grep -v ".git"
 48370245      4 drwxr-xr-x   9 alex     alex         4096 Apr 10 09:24 .
 49036739      4 drwxr-xr-x   9 root     root         4096 Apr 10 09:24 ./vim-colortemplate
 49036760      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/ftplugin
 49036761      4 -rw-rw-r--   1 root     root         2796 Jun  7  2023 ./vim-colortemplate/ftplugin/colortemplate.vim
 49036772      4 drwxrwxr-x   4 root     root         4096 Jun  7  2023 ./vim-colortemplate/test
 49036885      4 -rw-rw-r--   1 root     root          350 Jun  7  2023 ./vim-colortemplate/test/test52.txt
 49036903      4 -rw-rw-r--   1 root     root          342 Jun  7  2023 ./vim-colortemplate/test/test71.txt
 49036848      4 -rw-rw-r--   1 root     root          440 Jun  7  2023 ./vim-colortemplate/test/test29.txt
 49036912      4 -rw-rw-r--   1 root     root          288 Jun  7  2023 ./vim-colortemplate/test/test8.txt
 49036824      4 -rwxrwxr-x   1 root     root          118 Jun  7  2023 ./vim-colortemplate/test/hook_uninstall.sh
 49036883      4 -rw-rw-r--   1 root     root          475 Jun  7  2023 ./vim-colortemplate/test/test50b.txt
 49036906      4 -rw-rw-r--   1 root     root          355 Jun  7  2023 ./vim-colortemplate/test/test74.txt
 49036826     40 -rw-rw-r--   1 root     root        38116 Jun  7  2023 ./vim-colortemplate/test/runtests.vim
 49036910      4 -rw-rw-r--   1 root     root          255 Jun  7  2023 ./vim-colortemplate/test/test78.txt
 49036850      4 -rw-rw-r--   1 root     root          315 Jun  7  2023 ./vim-colortemplate/test/test30.txt
 49036857      4 -rw-rw-r--   1 root     root          337 Jun  7  2023 ./vim-colortemplate/test/test37.txt
 49036873      4 -rw-rw-r--   1 root     root          329 Jun  7  2023 ./vim-colortemplate/test/test47.txt
 49036853      4 -rw-rw-r--   1 root     root          285 Jun  7  2023 ./vim-colortemplate/test/test33.txt
 49036827      4 -rw-rw-r--   1 root     root         2348 Jun  7  2023 ./vim-colortemplate/test/test.vim
 49036908      4 -rw-rw-r--   1 root     root          411 Jun  7  2023 ./vim-colortemplate/test/test76.txt
 49036865      4 -rw-rw-r--   1 root     root          296 Jun  7  2023 ./vim-colortemplate/test/test41.txt
 49036870      4 -rw-rw-r--   1 root     root          264 Jun  7  2023 ./vim-colortemplate/test/test45.txt
 49036893      4 -rw-rw-r--   1 root     root          423 Jun  7  2023 ./vim-colortemplate/test/test61.txt
 49036829      4 -rw-rw-r--   1 root     root          263 Jun  7  2023 ./vim-colortemplate/test/test10.txt
 49036875      4 -rw-rw-r--   1 root     root          129 Jun  7  2023 ./vim-colortemplate/test/test48b.txt
 49036913      4 -rw-rw-r--   1 root     root          269 Jun  7  2023 ./vim-colortemplate/test/test80.txt
 49036900      4 -rw-rw-r--   1 root     root          247 Jun  7  2023 ./vim-colortemplate/test/test69.txt
 49036840      4 -rw-rw-r--   1 root     root          315 Jun  7  2023 ./vim-colortemplate/test/test20.txt
 49036880      4 -rw-rw-r--   1 root     root           43 Jun  7  2023 ./vim-colortemplate/test/test49c.txt
 49036916      4 -rw-rw-r--   1 root     root          795 Jun  7  2023 ./vim-colortemplate/test/test83.txt
 49036833      4 -rw-rw-r--   1 root     root          275 Jun  7  2023 ./vim-colortemplate/test/test14.txt
 49036837      4 -rw-rw-r--   1 root     root          591 Jun  7  2023 ./vim-colortemplate/test/test18.txt
 49036866      4 -rw-rw-r--   1 root     root          371 Jun  7  2023 ./vim-colortemplate/test/test42.txt
 49036825      4 -rwxrwxr-x   1 root     root          334 Jun  7  2023 ./vim-colortemplate/test/pre-push.sh
 49036874      4 -rw-rw-r--   1 root     root          281 Jun  7  2023 ./vim-colortemplate/test/test48a.txt
 49036905      4 -rw-rw-r--   1 root     root          311 Jun  7  2023 ./vim-colortemplate/test/test73.txt
 49036889      4 -rw-rw-r--   1 root     root          502 Jun  7  2023 ./vim-colortemplate/test/test58.txt
 49036847      4 -rw-rw-r--   1 root     root         1006 Jun  7  2023 ./vim-colortemplate/test/test28.txt
 49036878      4 -rw-rw-r--   1 root     root          302 Jun  7  2023 ./vim-colortemplate/test/test49a.txt
 49036869      4 -rw-rw-r--   1 root     root          163 Jun  7  2023 ./vim-colortemplate/test/test44b.txt
 49036882      4 -rw-rw-r--   1 root     root          263 Jun  7  2023 ./vim-colortemplate/test/test50a.txt
 49036854      4 -rw-rw-r--   1 root     root          282 Jun  7  2023 ./vim-colortemplate/test/test34.txt
 49036909      4 -rw-rw-r--   1 root     root          315 Jun  7  2023 ./vim-colortemplate/test/test77.txt
 49036835      4 -rw-rw-r--   1 root     root          296 Jun  7  2023 ./vim-colortemplate/test/test16.txt
 49036871      4 -rw-rw-r--   1 root     root          329 Jun  7  2023 ./vim-colortemplate/test/test46a.txt
 49036836      4 -rw-rw-r--   1 root     root          301 Jun  7  2023 ./vim-colortemplate/test/test17.txt
 49036904      4 -rw-rw-r--   1 root     root          450 Jun  7  2023 ./vim-colortemplate/test/test72.txt
 49036915      4 -rw-rw-r--   1 root     root          246 Jun  7  2023 ./vim-colortemplate/test/test82.txt
 49036861      4 -rw-rw-r--   1 root     root          187 Jun  7  2023 ./vim-colortemplate/test/test39a.txt
 49036890      4 -rw-rw-r--   1 root     root          379 Jun  7  2023 ./vim-colortemplate/test/test59.txt
 49036914      4 -rw-rw-r--   1 root     root          257 Jun  7  2023 ./vim-colortemplate/test/test81.txt
 49036926      4 -rw-rw-r--   1 root     root          436 Jun  7  2023 ./vim-colortemplate/test/test91.txt
 49036849      4 -rw-rw-r--   1 root     root          264 Jun  7  2023 ./vim-colortemplate/test/test3.txt
 49036864      4 -rw-rw-r--   1 root     root          299 Jun  7  2023 ./vim-colortemplate/test/test40.txt
 49036832      4 -rw-rw-r--   1 root     root          278 Jun  7  2023 ./vim-colortemplate/test/test13.txt
 49036852      4 -rw-rw-r--   1 root     root          269 Jun  7  2023 ./vim-colortemplate/test/test32.txt
 49036872      0 -rw-rw-r--   1 root     root            0 Jun  7  2023 ./vim-colortemplate/test/test46b.txt
 49036868      4 -rw-rw-r--   1 root     root          146 Jun  7  2023 ./vim-colortemplate/test/test44a.txt
 49036858      4 -rw-rw-r--   1 root     root          284 Jun  7  2023 ./vim-colortemplate/test/test38a.txt
 49036859      4 -rw-rw-r--   1 root     root           66 Jun  7  2023 ./vim-colortemplate/test/test38b.txt
 49036828      4 -rw-rw-r--   1 root     root          259 Jun  7  2023 ./vim-colortemplate/test/test1.txt
 49036856      4 -rw-rw-r--   1 root     root          417 Jun  7  2023 ./vim-colortemplate/test/test36.txt
 49036844      4 -rw-rw-r--   1 root     root          283 Jun  7  2023 ./vim-colortemplate/test/test24.txt
 49036876      4 -rw-rw-r--   1 root     root          112 Jun  7  2023 ./vim-colortemplate/test/test48c.txt
 49036891      4 -rw-rw-r--   1 root     root          265 Jun  7  2023 ./vim-colortemplate/test/test6.txt
 49036917      4 -rw-rw-r--   1 root     root          309 Jun  7  2023 ./vim-colortemplate/test/test84.txt
 49036923      4 -rw-rw-r--   1 root     root          284 Jun  7  2023 ./vim-colortemplate/test/test89.txt
 49036842      4 -rw-rw-r--   1 root     root          382 Jun  7  2023 ./vim-colortemplate/test/test22.txt
 49036823      4 -rwxrwxr-x   1 root     root          184 Jun  7  2023 ./vim-colortemplate/test/hook_install.sh
 49036899      4 -rw-rw-r--   1 root     root           44 Jun  7  2023 ./vim-colortemplate/test/test68b
 49036897      4 -rw-rw-r--   1 root     root          345 Jun  7  2023 ./vim-colortemplate/test/test66.txt
 49036896      4 -rw-rw-r--   1 root     root          394 Jun  7  2023 ./vim-colortemplate/test/test65.txt
 49036845      4 -rw-rw-r--   1 root     root          313 Jun  7  2023 ./vim-colortemplate/test/test25.txt
 49036898      4 -rw-rw-r--   1 root     root          227 Jun  7  2023 ./vim-colortemplate/test/test68a.txt
 49036925      4 -rw-rw-r--   1 root     root          320 Jun  7  2023 ./vim-colortemplate/test/test90.txt
 49036907      4 -rw-rw-r--   1 root     root          426 Jun  7  2023 ./vim-colortemplate/test/test75.txt
 49036838      4 -rw-rw-r--   1 root     root          318 Jun  7  2023 ./vim-colortemplate/test/test19.txt
 49036920      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/test/test87
 49036921      4 -rw-rw-r--   1 root     root          450 Jun  7  2023 ./vim-colortemplate/test/test87/test87.txt
 49036922      4 -rw-rw-r--   1 root     root          262 Jun  7  2023 ./vim-colortemplate/test/test88.txt
 49036886      4 -rw-rw-r--   1 root     root          301 Jun  7  2023 ./vim-colortemplate/test/test53.txt
 49036830      4 -rw-rw-r--   1 root     root          288 Jun  7  2023 ./vim-colortemplate/test/test11.txt
 49036927      4 -rw-rw-r--   1 root     root          292 Jun  7  2023 ./vim-colortemplate/test/test92.txt
 49036894      4 -rw-rw-r--   1 root     root          267 Jun  7  2023 ./vim-colortemplate/test/test63.txt
 49036841      4 -rw-rw-r--   1 root     root          334 Jun  7  2023 ./vim-colortemplate/test/test21.txt
 49036863      4 -rw-rw-r--   1 root     root          284 Jun  7  2023 ./vim-colortemplate/test/test4.txt
 49036839      4 -rw-rw-r--   1 root     root          298 Jun  7  2023 ./vim-colortemplate/test/test2.txt
 49036881      4 -rw-rw-r--   1 root     root          283 Jun  7  2023 ./vim-colortemplate/test/test5.txt
 49036843      4 -rw-rw-r--   1 root     root          447 Jun  7  2023 ./vim-colortemplate/test/test23.txt
 49036924      4 -rw-rw-r--   1 root     root          373 Jun  7  2023 ./vim-colortemplate/test/test9.txt
 49036860      4 -rw-rw-r--   1 root     root           48 Jun  7  2023 ./vim-colortemplate/test/test38c.txt
 49036902      4 -rw-rw-r--   1 root     root          420 Jun  7  2023 ./vim-colortemplate/test/test70.txt
 49036884      4 -rw-rw-r--   1 root     root          247 Jun  7  2023 ./vim-colortemplate/test/test51.txt
 49036867      4 -rw-rw-r--   1 root     root          317 Jun  7  2023 ./vim-colortemplate/test/test43.txt
 49036834      4 -rw-rw-r--   1 root     root          262 Jun  7  2023 ./vim-colortemplate/test/test15.txt
 49036879      4 -rw-rw-r--   1 root     root           56 Jun  7  2023 ./vim-colortemplate/test/test49b.txt
 49036877      4 -rw-rw-r--   1 root     root           49 Jun  7  2023 ./vim-colortemplate/test/test48d.txt
 49036846      4 -rw-rw-r--   1 root     root          224 Jun  7  2023 ./vim-colortemplate/test/test27.txt
 49036901      4 -rw-rw-r--   1 root     root          267 Jun  7  2023 ./vim-colortemplate/test/test7.txt
 49036895      4 -rw-rw-r--   1 root     root          388 Jun  7  2023 ./vim-colortemplate/test/test64.txt
 49036831      4 -rw-rw-r--   1 root     root          264 Jun  7  2023 ./vim-colortemplate/test/test12.txt
 49036918      4 -rw-rw-r--   1 root     root          362 Jun  7  2023 ./vim-colortemplate/test/test85.txt
 49036919      4 -rw-rw-r--   1 root     root          449 Jun  7  2023 ./vim-colortemplate/test/test86.txt
 49036892      4 -rw-rw-r--   1 root     root          271 Jun  7  2023 ./vim-colortemplate/test/test60.txt
 49036855      4 -rw-rw-r--   1 root     root          324 Jun  7  2023 ./vim-colortemplate/test/test35.txt
 49036851      4 -rw-rw-r--   1 root     root          255 Jun  7  2023 ./vim-colortemplate/test/test31.txt
 49036887      4 -rw-rw-r--   1 root     root          561 Jun  7  2023 ./vim-colortemplate/test/test54.txt
 49036862      4 -rw-rw-r--   1 root     root          140 Jun  7  2023 ./vim-colortemplate/test/test39b.txt
 49036888      4 -rw-rw-r--   1 root     root          248 Jun  7  2023 ./vim-colortemplate/test/test57.txt
 49036773      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/test/expected
 49036779      4 -rw-rw-r--   1 root     root          140 Jun  7  2023 ./vim-colortemplate/test/expected/test29.txt
 49036792      4 -rw-rw-r--   1 root     root          405 Jun  7  2023 ./vim-colortemplate/test/expected/test50a.vim
 49036800      4 -rw-rw-r--   1 root     root          385 Jun  7  2023 ./vim-colortemplate/test/expected/test63.vim
 49036807      4 -rw-rw-r--   1 root     root          387 Jun  7  2023 ./vim-colortemplate/test/expected/test73.vim
 49036776      4 -rw-rw-r--   1 root     root          461 Jun  7  2023 ./vim-colortemplate/test/expected/test24.vim
 49036777      4 -rw-rw-r--   1 root     root          402 Jun  7  2023 ./vim-colortemplate/test/expected/test27.vim
 49036811      4 -rw-rw-r--   1 root     root          345 Jun  7  2023 ./vim-colortemplate/test/expected/test78.vim
 49036817      4 -rw-rw-r--   1 root     root          716 Jun  7  2023 ./vim-colortemplate/test/expected/test84.vim
 49036812      4 -rw-rw-r--   1 root     root          341 Jun  7  2023 ./vim-colortemplate/test/expected/test79.vim
 49036784      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test37.vim
 49036786      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test41.vim
 49036802      4 -rw-rw-r--   1 root     root          408 Jun  7  2023 ./vim-colortemplate/test/expected/test65.vim
 49036821      4 -rw-rw-r--   1 root     root         1084 Jun  7  2023 ./vim-colortemplate/test/expected/test91.vim
 49036806      4 -rw-rw-r--   1 root     root          688 Jun  7  2023 ./vim-colortemplate/test/expected/test72.vim
 49036796      4 -rw-rw-r--   1 root     root          560 Jun  7  2023 ./vim-colortemplate/test/expected/test58.vim
 49036788      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test43.vim
 49036819      4 -rw-rw-r--   1 root     root          538 Jun  7  2023 ./vim-colortemplate/test/expected/test89.vim
 49036787      4 -rw-rw-r--   1 root     root          417 Jun  7  2023 ./vim-colortemplate/test/expected/test42.vim
 49036820      4 -rw-rw-r--   1 root     root          581 Jun  7  2023 ./vim-colortemplate/test/expected/test90.vim
 49036790      4 -rw-rw-r--   1 root     root          519 Jun  7  2023 ./vim-colortemplate/test/expected/test46a.vim
 49036814      4 -rw-rw-r--   1 root     root          422 Jun  7  2023 ./vim-colortemplate/test/expected/test81.vim
 49036793      4 -rw-rw-r--   1 root     root          789 Jun  7  2023 ./vim-colortemplate/test/expected/test50b.vim
 49036782      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test33.vim
 49036816      4 -rw-rw-r--   1 root     root          770 Jun  7  2023 ./vim-colortemplate/test/expected/test83.vim
 49036797      4 -rw-rw-r--   1 root     root          641 Jun  7  2023 ./vim-colortemplate/test/expected/test59.vim
 49036778      4 -rw-rw-r--   1 root     root         1790 Jun  7  2023 ./vim-colortemplate/test/expected/test28.vim
 49036783      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test34.vim
 49036803      4 -rw-rw-r--   1 root     root          345 Jun  7  2023 ./vim-colortemplate/test/expected/test68a.vim
 49036822      4 -rw-rw-r--   1 root     root          730 Jun  7  2023 ./vim-colortemplate/test/expected/test92.vim
 49036799      4 -rw-rw-r--   1 root     root          426 Jun  7  2023 ./vim-colortemplate/test/expected/test61.vim
 49036789      4 -rw-rw-r--   1 root     root          405 Jun  7  2023 ./vim-colortemplate/test/expected/test44a.vim
 49036780      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test29.vim
 49036781      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test30.vim
 49036804      4 -rw-rw-r--   1 root     root          410 Jun  7  2023 ./vim-colortemplate/test/expected/test7.vim
 49036813      4 -rw-rw-r--   1 root     root          409 Jun  7  2023 ./vim-colortemplate/test/expected/test80.vim
 49036818      4 -rw-rw-r--   1 root     root          579 Jun  7  2023 ./vim-colortemplate/test/expected/test88.vim
 49036794      4 -rw-rw-r--   1 root     root         1471 Jun  7  2023 ./vim-colortemplate/test/expected/test51.txt
 49036785      4 -rw-rw-r--   1 root     root          623 Jun  7  2023 ./vim-colortemplate/test/expected/test38a.vim
 49036791      4 -rw-rw-r--   1 root     root          515 Jun  7  2023 ./vim-colortemplate/test/expected/test5.vim
 49036805      4 -rw-rw-r--   1 root     root          520 Jun  7  2023 ./vim-colortemplate/test/expected/test70.vim
 49036808      4 -rw-rw-r--   1 root     root          487 Jun  7  2023 ./vim-colortemplate/test/expected/test74.vim
 49036815      4 -rw-rw-r--   1 root     root          309 Jun  7  2023 ./vim-colortemplate/test/expected/test82.vim
 49036809      4 -rw-rw-r--   1 root     root         1841 Jun  7  2023 ./vim-colortemplate/test/expected/test76.vim
 49036775      4 -rw-rw-r--   1 root     root          963 Jun  7  2023 ./vim-colortemplate/test/expected/test22.vim
 49036801      4 -rw-rw-r--   1 root     root          658 Jun  7  2023 ./vim-colortemplate/test/expected/test64.vim
 49036810      4 -rw-rw-r--   1 root     root          435 Jun  7  2023 ./vim-colortemplate/test/expected/test77.vim
 49036774      4 -rw-rw-r--   1 root     root          401 Jun  7  2023 ./vim-colortemplate/test/expected/test1.vim
 49036798      4 -rw-rw-r--   1 root     root          369 Jun  7  2023 ./vim-colortemplate/test/expected/test60.vim
 49036795      4 -rw-rw-r--   1 root     root          403 Jun  7  2023 ./vim-colortemplate/test/expected/test53.vim
 49036911      4 -rw-rw-r--   1 root     root          221 Jun  7  2023 ./vim-colortemplate/test/test79.txt
 49036762      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/syntax
 49036763      4 -rw-rw-r--   1 root     root         2626 Jun  7  2023 ./vim-colortemplate/syntax/colortemplate-info.vim
 49036764     20 -rw-rw-r--   1 root     root        17782 Jun  7  2023 ./vim-colortemplate/syntax/colortemplate.vim
 49036758      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/ftdetect
 49036759      4 -rw-rw-r--   1 root     root           69 Jun  7  2023 ./vim-colortemplate/ftdetect/colortemplate.vim
 49036745      4 -rw-rw-r--   1 root     root         3008 Jun  7  2023 ./vim-colortemplate/Readme.md
 49036746      4 drwxrwxr-x   3 root     root         4096 Jun  7  2023 ./vim-colortemplate/autoload
 49036748      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate
 49036753      4 -rw-rw-r--   1 root     root         1899 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate/toolbar.vim
 49036752     12 -rw-rw-r--   1 root     root        12236 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate/syn.vim
 49036751     52 -rw-rw-r--   1 root     root        50578 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate/style.vim
 49036750     12 -rw-rw-r--   1 root     root        10938 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate/import.vim
 49036749     40 -rw-rw-r--   1 root     root        37788 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate/colorspace.vim
 49036754      4 -rw-rw-r--   1 root     root         3667 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate/vimspectr.vim
 49036747     88 -rw-rw-r--   1 root     root        87827 Jun  7  2023 ./vim-colortemplate/autoload/colortemplate.vim
 49036765      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/templates
 49036766      4 -rw-rw-r--   1 root     root         2937 Jun  7  2023 ./vim-colortemplate/templates/_bw.colortemplate
 49036767      4 -rw-rw-r--   1 root     root          557 Jun  7  2023 ./vim-colortemplate/templates/_help.colortemplate
 49036769     12 -rw-rw-r--   1 root     root        12160 Jun  7  2023 ./vim-colortemplate/templates/dark_and_light.colortemplate
 49036771      8 -rw-rw-r--   1 root     root         6788 Jun  7  2023 ./vim-colortemplate/templates/light.colortemplate
 49036768      8 -rw-rw-r--   1 root     root         6780 Jun  7  2023 ./vim-colortemplate/templates/dark.colortemplate
 49036770     20 -rw-rw-r--   1 root     root        18457 Jun  7  2023 ./vim-colortemplate/templates/default_clone.colortemplate
 49036755      4 drwxrwxr-x   2 root     root         4096 Jun  7  2023 ./vim-colortemplate/doc
 49036756     60 -rw-rw-r--   1 root     root        60389 Jun  7  2023 ./vim-colortemplate/doc/colortemplate.txt
 49036757      8 -rw-rw-r--   1 root     root         5288 Jun  7  2023 ./vim-colortemplate/doc/tags
 48398785      4 -rw-r--r--   1 alex     alex          167 Apr 10 08:51 ./.luacheckrc
 49036928      4 drwxr-xr-x   4 root     root         4096 Apr 10 09:24 ./mini-align
 49036929      4 -rw-rw-r--   1 root     root         1074 Sep  5  2024 ./mini-align/LICENSE
 49036931      4 drwxrwxr-x   2 root     root         4096 Sep  5  2024 ./mini-align/doc
 49036932     36 -rw-rw-r--   1 root     root        34790 Sep  5  2024 ./mini-align/doc/mini-align.txt
 49036933      4 drwxrwxr-x   3 root     root         4096 Sep  5  2024 ./mini-align/lua
 49036934      4 drwxrwxr-x   2 root     root         4096 Sep  5  2024 ./mini-align/lua/mini
 49036935     76 -rw-rw-r--   1 root     root        75592 Sep  5  2024 ./mini-align/lua/mini/align.lua
 49036930      8 -rw-rw-r--   1 root     root         8128 Sep  5  2024 ./mini-align/README.md
 48398787      4 -rw-r--r--   1 alex     alex          703 Apr 10 08:51 ./.pre-commit-config.yaml
 49036725      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 08:51 ./scripts
 49036728      8 -rw-r--r--   1 alex     alex         4794 Apr 10 08:51 ./scripts/generate.lua
 49036727      4 -rwxr-xr-x   1 alex     alex          734 Apr 10 08:51 ./scripts/filetypes.sh
 49036726      4 -rw-r--r--   1 alex     alex         1181 Apr 10 08:51 ./scripts/align.lua
 49036729      4 -rw-r--r--   1 alex     alex          390 Apr 10 08:51 ./scripts/sort_filetypes.lua
 49036601      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 08:51 ./plugin
 49036620      4 -rw-r--r--   1 alex     alex          214 Apr 10 08:51 ./plugin/nvim-web-devicons.vim
 48398788      4 -rw-r--r--   1 alex     alex          140 Apr 10 08:51 ./.stylua.toml
 48398791      4 -rw-r--r--   1 alex     alex         1066 Apr 10 08:51 ./LICENSE
 48394329      4 -rw-r--r--   1 alex     alex          187 Apr 10 08:51 ./.editorconfig
 48398795      4 -rw-r--r--   1 alex     alex          983 Apr 10 08:51 ./Dockerfile
 48398789      4 -rw-r--r--   1 alex     alex           36 Apr 10 08:51 ./.styluaignore
 48398790      8 -rw-r--r--   1 alex     alex         4814 Apr 10 08:51 ./CONTRIBUTING.md
 48398792      4 -rw-r--r--   1 alex     alex         1354 Apr 10 08:51 ./Makefile
 49036358      4 drwxr-xr-x   3 alex     alex         4096 Apr 10 08:51 ./lua
 49036401      4 drwxr-xr-x   4 alex     alex         4096 Apr 10 09:24 ./lua/nvim-web-devicons
 49036468      4 -rw-r--r--   1 alex     alex          448 Apr 10 08:51 ./lua/nvim-web-devicons/icons-light.lua
 49036473      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 09:24 ./lua/nvim-web-devicons/light
 49036480      4 -rw-r--r--   1 root     root          915 Apr 10 09:24 ./lua/nvim-web-devicons/light/icons_by_desktop_environment.lua
 49036426      8 -rw-r--r--   1 root     root         6876 Apr 10 09:24 ./lua/nvim-web-devicons/light/icons_by_operating_system.lua
 49036425     28 -rw-r--r--   1 root     root        27601 Apr 10 09:24 ./lua/nvim-web-devicons/light/icons_by_filename.lua
 49036493     60 -rw-r--r--   1 root     root        57709 Apr 10 09:24 ./lua/nvim-web-devicons/light/icons_by_file_extension.lua
 49036427      4 -rw-r--r--   1 root     root         1398 Apr 10 09:24 ./lua/nvim-web-devicons/light/icons_by_window_manager.lua
 49036435      8 -rw-r--r--   1 alex     alex         5188 Apr 10 09:24 ./lua/nvim-web-devicons/filetypes.lua
 49036438      8 -rw-r--r--   1 alex     alex         4991 Apr 10 08:51 ./lua/nvim-web-devicons/hi-test.lua
 49036439      4 -rw-r--r--   1 alex     alex          458 Apr 10 08:51 ./lua/nvim-web-devicons/icons-default.lua
 49036424      4 drwxr-xr-x   2 alex     alex         4096 Apr 10 09:24 ./lua/nvim-web-devicons/default
 49036936      4 -rw-r--r--   1 alex     alex          801 Apr 10 09:24 ./lua/nvim-web-devicons/default/icons_by_desktop_environment.lua
 49036943      8 -rw-r--r--   1 alex     alex         6765 Apr 10 09:24 ./lua/nvim-web-devicons/default/icons_by_operating_system.lua
 49036437     28 -rw-r--r--   1 alex     alex        27498 Apr 10 09:24 ./lua/nvim-web-devicons/default/icons_by_filename.lua
 49036945     60 -rw-r--r--   1 alex     alex        57600 Apr 10 09:24 ./lua/nvim-web-devicons/default/icons_by_file_extension.lua
 49036942      4 -rw-r--r--   1 alex     alex         1289 Apr 10 09:24 ./lua/nvim-web-devicons/default/icons_by_window_manager.lua
 49036375     16 -rw-r--r--   1 alex     alex        12811 Apr 10 08:51 ./lua/nvim-web-devicons.lua
 48398786      4 -rw-r--r--   1 alex     alex          216 Apr 10 08:51 ./.luarc.json
 48398793     12 -rw-r--r--   1 alex     alex         9634 Apr 10 08:51 ./README.md
: ;

@alex-courtis
Copy link
Copy Markdown
Member

It looks like make filetypes is not reporting errors, although it seems to execute OK:

: ; git diff
diff --git a/lua/nvim-web-devicons/filetypes.lua b/lua/nvim-web-devicons/filetypes.lua
index cfaddfa..da5d6c6 100644
--- a/lua/nvim-web-devicons/filetypes.lua
+++ b/lua/nvim-web-devicons/filetypes.lua
@@ -1,7 +1,6 @@
 ---Maps filetypes to icon names
 ---@type table<string, iconName>
 return {
-  ["ada"] = "ada",
   ["apl"] = "apl",
   ["asm"] = "asm",
   ["astro"] = "astro",
: ; docker run --rm -ti -v "$(pwd):/host" -w /host nvim-web-devicons:latest make filetypes
./scripts/filetypes.sh
: ; make filetypes
./scripts/filetypes.sh
Please add "ada" to Lua table in lua/nvim-web-devicons/filetypes.lua.
make: *** [Makefile:42: filetypes] Error 1
: 2 ;

@fjfnaranjo
Copy link
Copy Markdown
Contributor Author

fjfnaranjo commented Apr 9, 2026

After running a make, the generated files are all owned by root and thus no longer editable.

This is a known issue with Docker and users with experience using Docker will know how to run the file as it is now.

Docker follows a security model that is closer to how classic Linux servers/daemons work. A server is run as root and you, as a user, can ask the server to run the container using the CLI if you belong to a particular group in the system.

They will be run as root and you will get the permission problems.

You can install and configure Docker to use unpriviledged containers to avoid running containers as a user that can access you entire system, but regular users just use a parameter to override the user that runs the commands after the docker command.

docker run --rm -ti .... --user 1000:1000 image cmd...

You will not need this neither in podman (linux) nor in colima (Mac) because they by default use unpriviledged containers, running the commands as your user without the need to specify --user argument.

I suggest you either switch to them or use the --user command in your invocations.

Ideally (and maybe controversial), it is safer to avoid Docker entirely if you are not willing to do the effort of configuring it as unpriviledged (instructions in their site) and just remove it from your system. If you can run this with --user it probably means that any process can run it and get system access in your user session. This is specially dangerous if you have sudo configured to avoid asking passwords.

Take into account that I'm offering a superficial/incomplete description on Docker/Linux's security/server model and the full explanation is more complex. You may be already protected for some of the more common exploits but I don't know your system and I'm doing general assumptions.

@alex-courtis
Copy link
Copy Markdown
Member

alex-courtis commented Apr 10, 2026

Understood. There are many caveats to raw dockerised builds.

This is valuable and we should make it available. I've created a skeletal wiki and would be most grateful if you added a section "Dockerfile for reproducible dev/ci environment" or similar to the development page.

We can then link CONTRIBUTING.md to the wiki, as we've done with nvim-tree.lua

@fjfnaranjo
Copy link
Copy Markdown
Contributor Author

Do you mind if I propose an alternative?

My reasoning is: the caveats of container based building are completely integrated into the devs that know how containers works. Adding explanations in this project wiki would be like explaining how do make works.

You can assume that contributors that already understand how Docker works would be able to use the image as it is now.

But, to ease its usage, we can just add the couple of commands needed to run the project scripts in a section under "Building" in the contribution notes.

Think:

Building

  • Generate
  • Validate
  • Using a container

And in that third section add the neutral Docker form for the commands:

docker build -t nvim-web-devicons:latest .
docker run --rm -ti --user "`id -u`:`id -g`" -v "$(pwd):/host" -w /host nvim-web-devicons:latest make

What do you think?

Podman and MacOS users already know they have to remove the user argument, but we can add a quick note for them.

This change will live closer to the code and avoid drifting away if the wiki doesn't get updated.

Copy link
Copy Markdown
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind if I propose an alternative?

That sounds reasonable. Please:

The container will be for local dev only:

  • we use github actions for all of CI to install nvim, tools etc. in the default container
  • CI actions / versions etc. are auto-updated via the dependabot agent. We don't want to add any manual tasks to update the dockerfile etc.

Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
Comment thread Dockerfile
@fjfnaranjo
Copy link
Copy Markdown
Contributor Author

Sure, let me take a look and push a new commit with the changes. Installing custom software in /usr/local is a normal thing is Linux and is supported everywhere, but I can change it to use /usr as you said.

The stylua shim is to avoid using cargo to install it. It needs to download half a Gb of packages from apt plus whatever stylua uses.

I will review the base image. I just used trixie as an example because its what I use for my local system, but I expected to carefully review the Dockerfile if you were ok with adding it.

@alex-courtis
Copy link
Copy Markdown
Member

alex-courtis commented Apr 15, 2026

The stylua shim is to avoid using cargo to install it. It needs to download half a Gb of packages from apt plus whatever stylua uses.

Thank you. Cargo is definitely one to avoid for dev and CI.

Installing custom software in /usr/local is a normal thing is Linux and is supported everywhere, but I can change it to use /usr as you said.

Actually, I'm not too fussed about the location (see CI), just so long as we do it in the fewest possible commands and remember to set VIMRUNTIME.

Copy link
Copy Markdown
Contributor Author

@fjfnaranjo fjfnaranjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL @alex-courtis. I did a self review to add some notes.

Comment thread CONTRIBUTING.md
Comment on lines +143 to +144
docker build -t nvim-web-devicons:latest .
docker run --rm -ti --user "`id -u`:`id -g`" -v "$(pwd):/host" -w /host nvim-web-devicons:latest make
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, someone run this commands locally. I don't have docker to test them.

Comment thread Dockerfile
@@ -0,0 +1,21 @@
FROM debian:stable-slim
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is latest, but not latest-slim. latest seems to be interchangeable with stable in this case (and will update when a new stable is made available).

@fjfnaranjo fjfnaranjo requested a review from alex-courtis April 18, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants