Skip to contentSkip to conversation

Docker init script possibly uses wrong invocation?

DISCUSSION David Antliff 2 participants 3 messages Aug 2, 2018 – Aug 3, 2018

lore
Share & tools
lore
#0 lore raw

I've installed the "docker" (docker_git.bb) recipe in my ARM64 yocto image, from meta-virtualization 1e67a44 (24 July).

I note that it installed /etc/init.d/docker.init, however this fails to start the daemon.

The script runs /usr/bin/docker daemon ... however this command is not recognised by this program:

# /usr/bin/docker daemon
docker: 'daemon' is not a docker command.

Instead, /usr/bin/dockerd run manually seems to do something more useful:
?

# /usr/bin/dockerd
INFO[2018-08-02T04:05:04.144036840Z] libcontainerd: started new docker-containerd process  pid=4643
INFO[0000] starting containerd                           module=containerd revision=cfd04396dc68220d1cecbe686a6cc3aa5ce3667c.m version=v1.0.2.m
...

I've noticed that docker.service also uses this invocation:

https://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/recipes-containers/docker/files/docker.service

This makes me wonder if I've misconfigured something, or am I unlucky in my timing such that docker-from-git has changed its behaviour in this area very recently?

--
David.

#1 lore raw
Quoted 23 lines · David Antliff

I've installed the "docker" (docker_git.bb) recipe in my ARM64 yocto image, from meta-virtualization 1e67a44 (24 July).

I note that it installed /etc/init.d/docker.init, however this fails to start the daemon.

The script runs /usr/bin/docker daemon ... however this command is not recognised by this program:

# /usr/bin/docker daemon
docker: 'daemon' is not a docker command.

Instead, /usr/bin/dockerd run manually seems to do something more useful:

# /usr/bin/dockerd
INFO[2018-08-02T04:05:04.144036840Z] libcontainerd: started new
docker-containerd process  pid=4643
INFO[0000] starting containerd                           module=containerd
revision=cfd04396dc68220d1cecbe686a6cc3aa5ce3667c.m version=v1.0.2.m
...
Quoted 7 lines

I've noticed that docker.service also uses this invocation:

https://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/recipes-containers/docker/files/docker.service

This makes me wonder if I've misconfigured something, or am I unlucky in my timing such that docker-from-git has changed its behaviour in this area very recently?

I can't say that I've tested the sysvinit version of docker for quite some time, so it very well could have some bitrot.

I do run the systemd version though, and haven't been having any issues.

Taking a look at things, I can see that yes, it should be dockerd and the sysvinit variant has rotted. The confusion around the systemd one is that the service file in the layer is no longer used, and is also out of date. We use the docker.service file from the source repo itself, and it has the correct daemon startup.

Did you want to submit a patch to update the sysvinit startup script ?

I'll cleanup the invalid/old systemd one, but since you are in a position to test the sysvinit one, it would be better if you could do it.

Cheers,

Bruce

Quoted 15 lines

--
David.

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#2 lore raw

Re: EXTERNAL: Re: Docker init script possibly uses wrong invocation?

Quoted 6 lines · On 03 August 2018 14:41 Bruce Ashfield wrote:

Taking a look at things, I can see that yes, it should be dockerd and the sysvinit variant has rotted. The confusion around the systemd one is that the service file in the layer is no longer used, and is also out of date. We use the docker.service file from the source repo itself, and it has the correct daemon startup.

Thank you for the explanation - it makes much more sense now I know that the systemd file is obsolete.

Quoted 1 line

Did you want to submit a patch to update the sysvinit startup script ?

Yes, I can do that. I'll send a patch through once I'm happy with my changes.

-- David.