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
.