profile
viewpoint

Ask questionsIncrease fs.inotify.max_user_watches in docker container

Opening certain projects leads to this error. However I am not sure how to work around it within the container. I have tried simply mounting a modified /etc/sysctl.conf from my host but it doesn't seem to make a difference.

How can we increase this within the container?

cdr/code-server

Answer questions perguth

docker run -dit -p 8443:8443   -v "${HOME}/.code-server:/home/coder/.local/share/code-server"   -v "${PWD}:/home/coder/project" codercom/code-server --allow-http --no-auth
# ...
# 💻 Via a web terminal of `code-server`:
coder@6495fcb79cd7:~/project$ cat /proc/sys/fs/inotify/max_user_watches
8192
coder@6495fcb79cd7:~/project$ echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /proc/sys/fs/inotify/max_user_watches
tee: /proc/sys/fs/inotify/max_user_watches: Read-only file system

😿

useful!
source:https://uonfu.com/
answerer
Per Guth perguth @thingylabs Stuttgart, Germany & Cyberspace ✨ https://perguth.js.org Free software enthusiast and transhumanist. • he/hey 😉
Github User Rank List