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
Is there a Scoville scale for coldness?
ogr2ogr commands with cmd
Can you marry a girl in Stardew Valley if you are a girl?
Is it possible for a tiger's tail to be taken off and replaced with a living cobra, with both creatures still alive?
I’m 18 years old and want to finance a £30,000 car
How to deal with this fundamental problem with the advice: "Don't trust obscure PHP libraries that nobody uses!"?
What's the greatest number of hands I can have to annoy my mother-in-law with?
Do the Jovians in "Victory Unintentional" exist in Isaac Asimov's Foundation series?
Do features such as Timeless Body remove the requirement of eating/drinking during a long rest to remove a level of exhaustion?
Short story: Man gains X-ray vision, cheats at cards, sees a clot in his blood
Solve unwanted white "waves" and "Pacman squares" in low-light picture - post using Google Photos
How can I force a bank to close my account with them?
Was a four year-old forced to sleep on the floor of Leeds General Infirmary?
What does "x employee is no longer employed by XYZ company" mean?
An Ailing Assassin
Did a man complain that his Pontiac wouldn't start whenever the ice cream he picked up was vanilla?
Why do aircraft cockpit displays use uppercase fonts?
Can we use a Cryptographic hash function to generate infinite random numbers?
how technically soft landing works without air on moon?
BASH print question (printf \$(printf '%03o' $1))
I've never seen this before. Is this primarily a "rote computational trick" for multiplication by 9 ...?
Is it possible to kill parasitic worms by intoxicating oneself?
What would the shape of orbits of planets be if hypothetically the gravitational force be proportional to the inverse of cube of distance from Sun?
Is it principled to tip less if a pricey restaurant doesn't accept Visa or Mastercard?
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;
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
add a comment
|
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
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
add a comment
|
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
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
server systemd services docker
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
add a comment
|
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
add a comment
|
2 Answers
2
active
oldest
votes
Follow these steps.
- Go to /etc/init.d
- Add a file( say example ) and place the script you want to execute in that.
- chmod +x /etc/init.d/example. (permissions)
- Add # chkconfig: 345 99 10 inside your script
- 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.
add a comment
|
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
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Follow these steps.
- Go to /etc/init.d
- Add a file( say example ) and place the script you want to execute in that.
- chmod +x /etc/init.d/example. (permissions)
- Add # chkconfig: 345 99 10 inside your script
- 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.
add a comment
|
Follow these steps.
- Go to /etc/init.d
- Add a file( say example ) and place the script you want to execute in that.
- chmod +x /etc/init.d/example. (permissions)
- Add # chkconfig: 345 99 10 inside your script
- 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.
add a comment
|
Follow these steps.
- Go to /etc/init.d
- Add a file( say example ) and place the script you want to execute in that.
- chmod +x /etc/init.d/example. (permissions)
- Add # chkconfig: 345 99 10 inside your script
- 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.
Follow these steps.
- Go to /etc/init.d
- Add a file( say example ) and place the script you want to execute in that.
- chmod +x /etc/init.d/example. (permissions)
- Add # chkconfig: 345 99 10 inside your script
- 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.
answered Oct 9 at 7:45
Shrinidhi KulkarniShrinidhi Kulkarni
1811 gold badge1 silver badge8 bronze badges
1811 gold badge1 silver badge8 bronze badges
add a comment
|
add a comment
|
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
add a comment
|
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
add a comment
|
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
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
edited Nov 14 at 1:30
answered Nov 14 at 1:16
YanYan
11 bronze badge
11 bronze badge
add a comment
|
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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