docker:Failed to add /run/systemd/ask-password to directory watch: No space left on device

ubuntu server docker installed successfully execute the following command to report an error:

systemctl start docker 


method 1: command line add monitoring space

sudo -i
echo 1048576 > /proc/sys/fs/inotify/max_user_watches
exit

method 2: modify the configuration file to make monitoring effective for a long time

sudo vim /etc/sysctl.conf

Add the following statement

to the end of the file

fs.inotify.max_user_watches=1048576

Read More: