JAremko / alpine-vim

"dockerized" Vim
264 stars 80 forks source link

Add ability to choose uid and gid #4

Open ismell opened 6 years ago

ismell commented 6 years ago

I'm trying to edit the contents of a volume, but I need uid = 100 and gid = nobody It would be nice if the container somehow respected docker run --user 100:nobody so I was able to edit my files with the correct permissions.

ismell commented 6 years ago

Found this example: https://github.com/rocker-org/rocker-versioned/blob/master/rstudio/3.4.2/userconf.sh#L26

tuanhtrng commented 6 years ago

The alpine-vim-base is working with custom uid/gid as long as /etc/passwd and /etc/group are mounted properly. It is strongly recommended to mount them as read-only. The bundle, however, will not be available. User resources/plugins have to be mounted if the extended capabilities are required.

As for the vim-bundle image, it is rather complicated to meet your request. The hardcoded permission has to be undone, and those vim resources/plugins have to be installed at the system level.