简体   繁体   English

使用sysVinit启动Docker守护程序

[英]Starting Docker daemon with sysVinit

at the moment I work with ARM64 based Debian Images and docker . 目前,我使用基于ARM64的Debian Images和docker

I want to automate the docker daemon on boot so we do not have to start it manually. 我想在启动时自动化docker守护进程,因此我们不必手动启动它。 But the Images do not use the systemd but good old sysVinit . 但是,映像不使用systemd,而是使用良好的旧sysVinit

So I though "quite easy - simple an init script with command "dockerd" (or start-stop-daemon and dockerd as Argument". But no - does not work. The command "dockerd -v" works fine when booting (checked by pipe output to log file). But when execute "dockerd" without an Argument - so simple start daemon - nothing happen - no error no warning nothing is piped to log file. 所以我虽然“很容易-使用命令“ dockerd”(或以start-stop-daemon和dockerd作为参数简单地初始化脚本)。但是不-不起作用。引导时命令“ dockerd -v”可以正常工作(通过管道输出到日志文件),但是在不带参数的情况下执行“ dockerd”时-如此简单的启动守护进程-不会发生任何事情-不会出现错误,也不会发出警告

So my question is - are there any other processes Need to be started or configurations need to be done before this dockerd command can be started? 所以我的问题是-在启动此dockerd命令之前,是否还需要启动其他进程或完成配置?

When boot is finished and i do SSH to device and manually do "dockerd" all works fine. 启动完成后,我将SSH连接到设备并手动执行“ dockerd”,一切正常。

just for close this question by myself :D 只是为了自己关闭这个问题:D

I noticed that in sysVinit system when starting the init-scripts the path variable did not exist (maybe because root starting the processes). 我注意到在sysVinit系统中,启动init脚本时,路径变量不存在(可能是因为root启动了进程)。 #

So in my script i just added the path variable and set path to folder of dockerd and everything worked well! 因此,在我的脚本中,我只添加了path变量,并将路径设置为dockerd文件夹,一切正常! :D :d

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM