'Docker default-ulimit nofile setting

/etc/docker/daemon.json has the following contents

{ 
 "live-restore": true,
  "default-ulimits": {
    "memlock": {
      "Hard": -1,
      "Name": "memlock",
      "Soft": -1
    }
  }
}

We want to set nofile limit in /etc/sysconfig/docker ex OPTIONS="--default-ulimit nofile=1024000:1024000" this should be in sysconfig/docker and not in daemon.json.

After setting it up docker was not coming up due to default-ulimit flag exist in daemon.json file as well. so how to override this setting? Please advise



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source