docker change cgroup driver to systemd

前端 未结 4 974
终归单人心
终归单人心 2021-02-20 03:20

I want to docker to start with systemd cgroup driver. for some reason it using only cgroupfs on my centos 7 server.

here is startup config file.

# system         


        
4条回答
  •  礼貌的吻别
    2021-02-20 04:18

    A solution that does not involve editing systemd units or drop-ins would be to create (or edit) the /etc/docker/daemon.json configuration file and to include the following:

    {
      "exec-opts": ["native.cgroupdriver=systemd"]
    }
    

    After saving it, restart your docker service.

    sudo systemctl restart docker
    

    This solution obviously is only feasible if you would want to apply this system-wide.

提交回复
热议问题