Presumably every docker user has already followed this advice and experienced a baffling message "unkown job docker". There are quite a lot of questions and some bug reports in the net, but seemingly no satisfying answers. The question seems to me: "What is upstart?" Here is my own workaround.
In place of many questions I refer to Docker Daemon on Ubuntu In place of some bug reports I refer to unable to restart containers There even exists a recommendation to download upstart
The command man -k upstart gives you some hints and man -s5 init shows you where to dig deeper and find your workaround. In the /etc/init/docker.conf the first 2 lines are
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
This is OK for business as usual, but extremely annoying during developing and testing, particularly when there are several processes running the docker daemon, e.g. one started at boot time and another one later by Vagrant's docker provider. After stopping Vagrant, I could not get rid of the process. So I commented the first two lines and had my peace.
Beware: the docker daemon obeys only to his master's voice, which is root. To avoid the eternal sudoing, here is what you can do as experienced user. (Click on the pictures to enlarge.)
Start/Stop docker |
docker messages |
No comments:
Post a Comment