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;
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