systemd wont use dockerd configuration fileHow do I configure Docker to use ZFS?Apache2 fails to start on boot with Ubuntu 16.04Docker fails to start if configured to use devicemapper with direct-lvmSystemd doesn't restart monit after killUnable to install docker - invoke-rc.d: initscript docker, action “start” failedwpa_supplicant is floading journalUbuntu 16.04 periodically resets /lib/systemd/system/memcached.service file

Aligning under and overbraces

Summing Values in an "Association" with the same Keys

Why is f'74' the same as f'74' with f-Strings?

Pregnant spouse slipped abortion pills unknowingly. What would the legal ramifications be?

Do women need to marry to be fulfilled?

Dealing Hex damage when a familiar delivers a touch spell

What is a Brown Bag Seminar?

Are bricks considered rock? What about stone?

Why are the 4th and 7th scale degrees removed from the major scale to make the Pentatonic scale?

What bit should I use to drill a two inch hole in a solid concrete wall?

Does the sterile cockpit rule mean flight attendants could not inform the pilots if a passenger is in the lavatory while on final?

Why does one mostly fall backward when slipping?

Can salted butter be used to make lemon curd?

Why do we need full-fledged workstations running massive OSes with massive software?

How does the bypass air provide thrust?

Is Two-Weapon Fighting the only way for a Horizon Walker ranger to use the Distant Strike feature to attack two different creatures?

Why aren't we seeing carbon taxes in practice?

Can I use baking powder in place of baking soda for dipping pretzels?

What's the advantage of importance sampling?

Merging two 2D wave animations into one 3D animation?

Why use an adjective after a noun?

How can I get 2 characters to bond while standing alternate watches?

Who is responsible on resolving conflicts on different PRs?

Was I wrong to rebutt unjustified rewiewer comments in the review?



systemd wont use dockerd configuration file


How do I configure Docker to use ZFS?Apache2 fails to start on boot with Ubuntu 16.04Docker fails to start if configured to use devicemapper with direct-lvmSystemd doesn't restart monit after killUnable to install docker - invoke-rc.d: initscript docker, action “start” failedwpa_supplicant is floading journalUbuntu 16.04 periodically resets /lib/systemd/system/memcached.service file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















I have to use systemctl daemon-reload and systemctl restart docker after every reboot, then the docker service will use daemon.json file to override default settings.



Ubuntu server 18.04, docker-ce 18.09.7



Is there a way to make this persistent ?



user@host:~$ cat /etc/docker/daemon.json

"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts":
"max-size": "100m"
,
"storage-driver": "overlay2"










share|improve this question



























  • Did you try running sudo systemctl enable docker as prerequisite to the setup?

    – Shrinidhi Kulkarni
    Oct 5 at 18:55











  • yes it's enabled, docker ps works after reboot, my problem is the cgroup driver reverts back to cgroupfs instead of systemd, a solution to this is systemctl daemon-reload & systemctl restart docker this passes daemon.json config to docker changing cgroup driver to systemd but this solution is not persistent after reboot.

    – m0ng00se
    Oct 6 at 0:12












  • This isn't a direct solution but I can give a solution which runs as startup script and does your job. Will that be fine?

    – Shrinidhi Kulkarni
    Oct 8 at 19:55











  • I can try script and see

    – m0ng00se
    Oct 8 at 20:28

















0


















I have to use systemctl daemon-reload and systemctl restart docker after every reboot, then the docker service will use daemon.json file to override default settings.



Ubuntu server 18.04, docker-ce 18.09.7



Is there a way to make this persistent ?



user@host:~$ cat /etc/docker/daemon.json

"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts":
"max-size": "100m"
,
"storage-driver": "overlay2"










share|improve this question



























  • Did you try running sudo systemctl enable docker as prerequisite to the setup?

    – Shrinidhi Kulkarni
    Oct 5 at 18:55











  • yes it's enabled, docker ps works after reboot, my problem is the cgroup driver reverts back to cgroupfs instead of systemd, a solution to this is systemctl daemon-reload & systemctl restart docker this passes daemon.json config to docker changing cgroup driver to systemd but this solution is not persistent after reboot.

    – m0ng00se
    Oct 6 at 0:12












  • This isn't a direct solution but I can give a solution which runs as startup script and does your job. Will that be fine?

    – Shrinidhi Kulkarni
    Oct 8 at 19:55











  • I can try script and see

    – m0ng00se
    Oct 8 at 20:28













0













0









0








I have to use systemctl daemon-reload and systemctl restart docker after every reboot, then the docker service will use daemon.json file to override default settings.



Ubuntu server 18.04, docker-ce 18.09.7



Is there a way to make this persistent ?



user@host:~$ cat /etc/docker/daemon.json

"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts":
"max-size": "100m"
,
"storage-driver": "overlay2"










share|improve this question
















I have to use systemctl daemon-reload and systemctl restart docker after every reboot, then the docker service will use daemon.json file to override default settings.



Ubuntu server 18.04, docker-ce 18.09.7



Is there a way to make this persistent ?



user@host:~$ cat /etc/docker/daemon.json

"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts":
"max-size": "100m"
,
"storage-driver": "overlay2"







server systemd services docker






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 6 at 0:45







m0ng00se

















asked Oct 1 at 2:37









m0ng00sem0ng00se

231 silver badge9 bronze badges




231 silver badge9 bronze badges















  • Did you try running sudo systemctl enable docker as prerequisite to the setup?

    – Shrinidhi Kulkarni
    Oct 5 at 18:55











  • yes it's enabled, docker ps works after reboot, my problem is the cgroup driver reverts back to cgroupfs instead of systemd, a solution to this is systemctl daemon-reload & systemctl restart docker this passes daemon.json config to docker changing cgroup driver to systemd but this solution is not persistent after reboot.

    – m0ng00se
    Oct 6 at 0:12












  • This isn't a direct solution but I can give a solution which runs as startup script and does your job. Will that be fine?

    – Shrinidhi Kulkarni
    Oct 8 at 19:55











  • I can try script and see

    – m0ng00se
    Oct 8 at 20:28

















  • Did you try running sudo systemctl enable docker as prerequisite to the setup?

    – Shrinidhi Kulkarni
    Oct 5 at 18:55











  • yes it's enabled, docker ps works after reboot, my problem is the cgroup driver reverts back to cgroupfs instead of systemd, a solution to this is systemctl daemon-reload & systemctl restart docker this passes daemon.json config to docker changing cgroup driver to systemd but this solution is not persistent after reboot.

    – m0ng00se
    Oct 6 at 0:12












  • This isn't a direct solution but I can give a solution which runs as startup script and does your job. Will that be fine?

    – Shrinidhi Kulkarni
    Oct 8 at 19:55











  • I can try script and see

    – m0ng00se
    Oct 8 at 20:28
















Did you try running sudo systemctl enable docker as prerequisite to the setup?

– Shrinidhi Kulkarni
Oct 5 at 18:55





Did you try running sudo systemctl enable docker as prerequisite to the setup?

– Shrinidhi Kulkarni
Oct 5 at 18:55













yes it's enabled, docker ps works after reboot, my problem is the cgroup driver reverts back to cgroupfs instead of systemd, a solution to this is systemctl daemon-reload & systemctl restart docker this passes daemon.json config to docker changing cgroup driver to systemd but this solution is not persistent after reboot.

– m0ng00se
Oct 6 at 0:12






yes it's enabled, docker ps works after reboot, my problem is the cgroup driver reverts back to cgroupfs instead of systemd, a solution to this is systemctl daemon-reload & systemctl restart docker this passes daemon.json config to docker changing cgroup driver to systemd but this solution is not persistent after reboot.

– m0ng00se
Oct 6 at 0:12














This isn't a direct solution but I can give a solution which runs as startup script and does your job. Will that be fine?

– Shrinidhi Kulkarni
Oct 8 at 19:55





This isn't a direct solution but I can give a solution which runs as startup script and does your job. Will that be fine?

– Shrinidhi Kulkarni
Oct 8 at 19:55













I can try script and see

– m0ng00se
Oct 8 at 20:28





I can try script and see

– m0ng00se
Oct 8 at 20:28










2 Answers
2






active

oldest

votes


















0



















Follow these steps.



  1. Go to /etc/init.d

  2. Add a file( say example ) and place the script you want to execute in that.

  3. chmod +x /etc/init.d/example. (permissions)

  4. Add # chkconfig: 345 99 10 inside your script

  5. Save it 6 Start the service with — service example start.

This should work as system service/ startup service .



Go into your example,
vi /etc/init.d/example then add -



systemctl daemon-reload
systemctl restart docker


If your commands do the work of over-writing , this will work.



Let me know if you face any challenge as distors do matter.






share|improve this answer
































    0



















    The default config file used during start up is actually this one:
    /var/snap/docker/current/config/daemon.json



    You can update this file instead.



    # Remove existing /etc/docker/daemon.json fisrt.
    ln /var/snap/docker/current/config/daemon.json /etc/docker/daemon.json

    cat > /etc/docker/daemon.json <<EOF

    "exec-opts": ["native.cgroupdriver=systemd"],
    "log-driver": "json-file",
    "log-opts":
    "max-size": "100m"
    ,
    "storage-driver": "overlay2"

    EOF





    share|improve this answer




























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );














      draft saved

      draft discarded
















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177801%2fsystemd-wont-use-dockerd-configuration-file%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown


























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0



















      Follow these steps.



      1. Go to /etc/init.d

      2. Add a file( say example ) and place the script you want to execute in that.

      3. chmod +x /etc/init.d/example. (permissions)

      4. Add # chkconfig: 345 99 10 inside your script

      5. Save it 6 Start the service with — service example start.

      This should work as system service/ startup service .



      Go into your example,
      vi /etc/init.d/example then add -



      systemctl daemon-reload
      systemctl restart docker


      If your commands do the work of over-writing , this will work.



      Let me know if you face any challenge as distors do matter.






      share|improve this answer





























        0



















        Follow these steps.



        1. Go to /etc/init.d

        2. Add a file( say example ) and place the script you want to execute in that.

        3. chmod +x /etc/init.d/example. (permissions)

        4. Add # chkconfig: 345 99 10 inside your script

        5. Save it 6 Start the service with — service example start.

        This should work as system service/ startup service .



        Go into your example,
        vi /etc/init.d/example then add -



        systemctl daemon-reload
        systemctl restart docker


        If your commands do the work of over-writing , this will work.



        Let me know if you face any challenge as distors do matter.






        share|improve this answer



























          0















          0











          0









          Follow these steps.



          1. Go to /etc/init.d

          2. Add a file( say example ) and place the script you want to execute in that.

          3. chmod +x /etc/init.d/example. (permissions)

          4. Add # chkconfig: 345 99 10 inside your script

          5. Save it 6 Start the service with — service example start.

          This should work as system service/ startup service .



          Go into your example,
          vi /etc/init.d/example then add -



          systemctl daemon-reload
          systemctl restart docker


          If your commands do the work of over-writing , this will work.



          Let me know if you face any challenge as distors do matter.






          share|improve this answer














          Follow these steps.



          1. Go to /etc/init.d

          2. Add a file( say example ) and place the script you want to execute in that.

          3. chmod +x /etc/init.d/example. (permissions)

          4. Add # chkconfig: 345 99 10 inside your script

          5. Save it 6 Start the service with — service example start.

          This should work as system service/ startup service .



          Go into your example,
          vi /etc/init.d/example then add -



          systemctl daemon-reload
          systemctl restart docker


          If your commands do the work of over-writing , this will work.



          Let me know if you face any challenge as distors do matter.







          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered Oct 9 at 7:45









          Shrinidhi KulkarniShrinidhi Kulkarni

          1811 gold badge1 silver badge8 bronze badges




          1811 gold badge1 silver badge8 bronze badges


























              0



















              The default config file used during start up is actually this one:
              /var/snap/docker/current/config/daemon.json



              You can update this file instead.



              # Remove existing /etc/docker/daemon.json fisrt.
              ln /var/snap/docker/current/config/daemon.json /etc/docker/daemon.json

              cat > /etc/docker/daemon.json <<EOF

              "exec-opts": ["native.cgroupdriver=systemd"],
              "log-driver": "json-file",
              "log-opts":
              "max-size": "100m"
              ,
              "storage-driver": "overlay2"

              EOF





              share|improve this answer































                0



















                The default config file used during start up is actually this one:
                /var/snap/docker/current/config/daemon.json



                You can update this file instead.



                # Remove existing /etc/docker/daemon.json fisrt.
                ln /var/snap/docker/current/config/daemon.json /etc/docker/daemon.json

                cat > /etc/docker/daemon.json <<EOF

                "exec-opts": ["native.cgroupdriver=systemd"],
                "log-driver": "json-file",
                "log-opts":
                "max-size": "100m"
                ,
                "storage-driver": "overlay2"

                EOF





                share|improve this answer





























                  0















                  0











                  0









                  The default config file used during start up is actually this one:
                  /var/snap/docker/current/config/daemon.json



                  You can update this file instead.



                  # Remove existing /etc/docker/daemon.json fisrt.
                  ln /var/snap/docker/current/config/daemon.json /etc/docker/daemon.json

                  cat > /etc/docker/daemon.json <<EOF

                  "exec-opts": ["native.cgroupdriver=systemd"],
                  "log-driver": "json-file",
                  "log-opts":
                  "max-size": "100m"
                  ,
                  "storage-driver": "overlay2"

                  EOF





                  share|improve this answer
















                  The default config file used during start up is actually this one:
                  /var/snap/docker/current/config/daemon.json



                  You can update this file instead.



                  # Remove existing /etc/docker/daemon.json fisrt.
                  ln /var/snap/docker/current/config/daemon.json /etc/docker/daemon.json

                  cat > /etc/docker/daemon.json <<EOF

                  "exec-opts": ["native.cgroupdriver=systemd"],
                  "log-driver": "json-file",
                  "log-opts":
                  "max-size": "100m"
                  ,
                  "storage-driver": "overlay2"

                  EOF






                  share|improve this answer















                  share|improve this answer




                  share|improve this answer








                  edited Nov 14 at 1:30

























                  answered Nov 14 at 1:16









                  YanYan

                  11 bronze badge




                  11 bronze badge































                      draft saved

                      draft discarded















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177801%2fsystemd-wont-use-dockerd-configuration-file%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown









                      Popular posts from this blog

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?