Skip to content

Instantly share code, notes, and snippets.

View vuhuythanh1995's full-sized avatar

Thanh Huy Vu vuhuythanh1995

  • Dicom
  • Hanoi
View GitHub Profile
@tsrivishnu
tsrivishnu / docker-increase-inotify-max-user-watches.md
Last active April 8, 2024 12:15
Increase inotify watchers in Docker images during build

Increasing fs.inotify.max_user_watches for Docker images

TL;DR You can't set those for an image during build time becasue Docker takes the sysctl configuration from the Host. So, set the config on your host machine.

As in this link, to increase the maximum watchers, we need set fs.inotify.max_user_watches to a higher number in /etc/sysctl.conf.

@artbristol
artbristol / monitor.sh
Last active March 24, 2023 04:54
inotify watch a directory with timestamps
inotifywait --monitor --timefmt '%F %T' --format '%T %w%f %e' --recursive $1