Docker CE not registered as a service on Debian 9
up vote
0
down vote
favorite
I've installed the Docker Community Edition according to the resource: https://linuxize.com/post/how-to-install-and-use-docker-on-debian-9/
However, when I reach step 5 (systemctl status docker) I get the following error message instead of the service status:
root@srv-012:/etc/systemd# systemctl start docker
Failed to start docker.service: Unknown unit: docker.service
See system logs and 'systemctl status docker.service' for details.
All commands are run as root. How can I fix this?
EDIT:
The file `/lib/systemd/system/docker.service` is created correctly, here is the contents:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H unix://
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target
debian docker
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
I've installed the Docker Community Edition according to the resource: https://linuxize.com/post/how-to-install-and-use-docker-on-debian-9/
However, when I reach step 5 (systemctl status docker) I get the following error message instead of the service status:
root@srv-012:/etc/systemd# systemctl start docker
Failed to start docker.service: Unknown unit: docker.service
See system logs and 'systemctl status docker.service' for details.
All commands are run as root. How can I fix this?
EDIT:
The file `/lib/systemd/system/docker.service` is created correctly, here is the contents:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H unix://
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target
debian docker
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Try to Fix your Typos
– 神秘德里克
2 hours ago
Which typos are you referring to?
– Daniel Becker
2 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've installed the Docker Community Edition according to the resource: https://linuxize.com/post/how-to-install-and-use-docker-on-debian-9/
However, when I reach step 5 (systemctl status docker) I get the following error message instead of the service status:
root@srv-012:/etc/systemd# systemctl start docker
Failed to start docker.service: Unknown unit: docker.service
See system logs and 'systemctl status docker.service' for details.
All commands are run as root. How can I fix this?
EDIT:
The file `/lib/systemd/system/docker.service` is created correctly, here is the contents:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H unix://
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target
debian docker
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I've installed the Docker Community Edition according to the resource: https://linuxize.com/post/how-to-install-and-use-docker-on-debian-9/
However, when I reach step 5 (systemctl status docker) I get the following error message instead of the service status:
root@srv-012:/etc/systemd# systemctl start docker
Failed to start docker.service: Unknown unit: docker.service
See system logs and 'systemctl status docker.service' for details.
All commands are run as root. How can I fix this?
EDIT:
The file `/lib/systemd/system/docker.service` is created correctly, here is the contents:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H unix://
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target
debian docker
debian docker
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago
Daniel Becker
11
11
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Daniel Becker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Try to Fix your Typos
– 神秘德里克
2 hours ago
Which typos are you referring to?
– Daniel Becker
2 hours ago
add a comment |
Try to Fix your Typos
– 神秘德里克
2 hours ago
Which typos are you referring to?
– Daniel Becker
2 hours ago
Try to Fix your Typos
– 神秘德里克
2 hours ago
Try to Fix your Typos
– 神秘德里克
2 hours ago
Which typos are you referring to?
– Daniel Becker
2 hours ago
Which typos are you referring to?
– Daniel Becker
2 hours ago
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
First, verify that file /lib/systemd/system/docker.service actually exists; if it doesn't, a previous installation step has failed - or the name of the service has changed since the tutorial was written.
Then, run systemctl daemon-reload to make systemd reload any new unit files. If systemctl status docker works after this, you might file a bug report about bad .deb packaging - the package should have done that automatically on install.
Thanks, the file does exist andsystemctl daemon-reloadruns successfully. However,systemctl status dockeris still failing with this error:Failed to get properties: No such interface ''
– Daniel Becker
2 hours ago
Next thing to check would be the contents of thedocker.servicefile.
– telcoM
2 hours ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
That error message suggests some kind of problem in communication between thesystemctlcommand and thesystemddaemon. Doessystemctl statusin general work at all? Are you using some other init system instead of Debian 9 defaultsystemd? That Docker package you installed assumessystemdis used. Is thesystemd-sysvpackage installed?
– telcoM
31 mins ago
add a comment |
up vote
0
down vote
Alternative solution.
When I installed docker on debian, I uses apt. I first had to add the repository to the sources. But after that I just did an apt-get update and an apt-get install. This is much easier.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
First, verify that file /lib/systemd/system/docker.service actually exists; if it doesn't, a previous installation step has failed - or the name of the service has changed since the tutorial was written.
Then, run systemctl daemon-reload to make systemd reload any new unit files. If systemctl status docker works after this, you might file a bug report about bad .deb packaging - the package should have done that automatically on install.
Thanks, the file does exist andsystemctl daemon-reloadruns successfully. However,systemctl status dockeris still failing with this error:Failed to get properties: No such interface ''
– Daniel Becker
2 hours ago
Next thing to check would be the contents of thedocker.servicefile.
– telcoM
2 hours ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
That error message suggests some kind of problem in communication between thesystemctlcommand and thesystemddaemon. Doessystemctl statusin general work at all? Are you using some other init system instead of Debian 9 defaultsystemd? That Docker package you installed assumessystemdis used. Is thesystemd-sysvpackage installed?
– telcoM
31 mins ago
add a comment |
up vote
0
down vote
First, verify that file /lib/systemd/system/docker.service actually exists; if it doesn't, a previous installation step has failed - or the name of the service has changed since the tutorial was written.
Then, run systemctl daemon-reload to make systemd reload any new unit files. If systemctl status docker works after this, you might file a bug report about bad .deb packaging - the package should have done that automatically on install.
Thanks, the file does exist andsystemctl daemon-reloadruns successfully. However,systemctl status dockeris still failing with this error:Failed to get properties: No such interface ''
– Daniel Becker
2 hours ago
Next thing to check would be the contents of thedocker.servicefile.
– telcoM
2 hours ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
That error message suggests some kind of problem in communication between thesystemctlcommand and thesystemddaemon. Doessystemctl statusin general work at all? Are you using some other init system instead of Debian 9 defaultsystemd? That Docker package you installed assumessystemdis used. Is thesystemd-sysvpackage installed?
– telcoM
31 mins ago
add a comment |
up vote
0
down vote
up vote
0
down vote
First, verify that file /lib/systemd/system/docker.service actually exists; if it doesn't, a previous installation step has failed - or the name of the service has changed since the tutorial was written.
Then, run systemctl daemon-reload to make systemd reload any new unit files. If systemctl status docker works after this, you might file a bug report about bad .deb packaging - the package should have done that automatically on install.
First, verify that file /lib/systemd/system/docker.service actually exists; if it doesn't, a previous installation step has failed - or the name of the service has changed since the tutorial was written.
Then, run systemctl daemon-reload to make systemd reload any new unit files. If systemctl status docker works after this, you might file a bug report about bad .deb packaging - the package should have done that automatically on install.
answered 2 hours ago
telcoM
14k11842
14k11842
Thanks, the file does exist andsystemctl daemon-reloadruns successfully. However,systemctl status dockeris still failing with this error:Failed to get properties: No such interface ''
– Daniel Becker
2 hours ago
Next thing to check would be the contents of thedocker.servicefile.
– telcoM
2 hours ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
That error message suggests some kind of problem in communication between thesystemctlcommand and thesystemddaemon. Doessystemctl statusin general work at all? Are you using some other init system instead of Debian 9 defaultsystemd? That Docker package you installed assumessystemdis used. Is thesystemd-sysvpackage installed?
– telcoM
31 mins ago
add a comment |
Thanks, the file does exist andsystemctl daemon-reloadruns successfully. However,systemctl status dockeris still failing with this error:Failed to get properties: No such interface ''
– Daniel Becker
2 hours ago
Next thing to check would be the contents of thedocker.servicefile.
– telcoM
2 hours ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
That error message suggests some kind of problem in communication between thesystemctlcommand and thesystemddaemon. Doessystemctl statusin general work at all? Are you using some other init system instead of Debian 9 defaultsystemd? That Docker package you installed assumessystemdis used. Is thesystemd-sysvpackage installed?
– telcoM
31 mins ago
Thanks, the file does exist and
systemctl daemon-reload runs successfully. However, systemctl status docker is still failing with this error: Failed to get properties: No such interface ''– Daniel Becker
2 hours ago
Thanks, the file does exist and
systemctl daemon-reload runs successfully. However, systemctl status docker is still failing with this error: Failed to get properties: No such interface ''– Daniel Becker
2 hours ago
Next thing to check would be the contents of the
docker.service file.– telcoM
2 hours ago
Next thing to check would be the contents of the
docker.service file.– telcoM
2 hours ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
Thanks, I added the content of the file, which looks good to me.
– Daniel Becker
1 hour ago
That error message suggests some kind of problem in communication between the
systemctl command and the systemd daemon. Does systemctl status in general work at all? Are you using some other init system instead of Debian 9 default systemd? That Docker package you installed assumes systemd is used. Is the systemd-sysv package installed?– telcoM
31 mins ago
That error message suggests some kind of problem in communication between the
systemctl command and the systemd daemon. Does systemctl status in general work at all? Are you using some other init system instead of Debian 9 default systemd? That Docker package you installed assumes systemd is used. Is the systemd-sysv package installed?– telcoM
31 mins ago
add a comment |
up vote
0
down vote
Alternative solution.
When I installed docker on debian, I uses apt. I first had to add the repository to the sources. But after that I just did an apt-get update and an apt-get install. This is much easier.
add a comment |
up vote
0
down vote
Alternative solution.
When I installed docker on debian, I uses apt. I first had to add the repository to the sources. But after that I just did an apt-get update and an apt-get install. This is much easier.
add a comment |
up vote
0
down vote
up vote
0
down vote
Alternative solution.
When I installed docker on debian, I uses apt. I first had to add the repository to the sources. But after that I just did an apt-get update and an apt-get install. This is much easier.
Alternative solution.
When I installed docker on debian, I uses apt. I first had to add the repository to the sources. But after that I just did an apt-get update and an apt-get install. This is much easier.
answered 40 mins ago
ctrl-alt-delor
9,73031952
9,73031952
add a comment |
add a comment |
Daniel Becker is a new contributor. Be nice, and check out our Code of Conduct.
Daniel Becker is a new contributor. Be nice, and check out our Code of Conduct.
Daniel Becker is a new contributor. Be nice, and check out our Code of Conduct.
Daniel Becker is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481644%2fdocker-ce-not-registered-as-a-service-on-debian-9%23new-answer', 'question_page');
}
);
Post as a guest
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
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
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
Try to Fix your Typos
– 神秘德里克
2 hours ago
Which typos are you referring to?
– Daniel Becker
2 hours ago