I'm using following system:

root@alexus:~# cat /etc/issue.net 
Ubuntu 14.04.3 LTS
root@alexus:~# uname -a
Linux alexus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I scheduled a cron job to check if docker service IS running and in case it doesn't, start:

root@alexus:~# crontab -l | grep 'service docker'
*/5 * * * * service docker status | grep -q 'docker\ start\/running\,\ process\ .*' ; if [ $? != 0 ] ; then service docker start ; fi

yet the message I receive from cron is following:

  • Docker is managed via upstart, try using service docker

and again if I ran it in shell directly, I don't get any output:

root@alexus:~# service docker status | grep -q 'docker\ start\/running\,\ process\ .*' ; if [ $? != 0 ] ; then service docker start ; fi

Why am I getting that message via cron, yet whenever I ran it directly on shell I don't get anything? am I doing it wrong way? What's the proper way to accomplish that?


Due to the current Docker 1.9.1 + Linux kernel bug 18180 which is buried deep in a Linux kernel bug related to AUFS, I was looking to move my Ubuntu 14.04 installation of Docker 1.9.1 down to Docker 1.8.3, but also have it auto-start on boot like the apt installer would have done...

So, I pulled the Docker 1.8.3 binary from https://get.docker.com/builds/Linux/x86_64/docker-1.8.3, then moved it to /usr/bin/docker, gave it sudo chmod +x /usr/bin/docker executable permissions.

Then, I grabbed the raw sysvinit-debian/docker script, and also commented out the check_init() body (it was giving me unnecessary grief) and replaced it with simply "echo 'Skipping check_init()" and then dropped it into /etc/init.d. Then I set that script to run on boot startup as root with ln -s /etc/init.d/docker /etc/rc2.d/S99docker, and ran sudo reboot. After that, I'm back running the Docker (1.8.3) service on boot, from a raw binary installation:

$ service docker status
 * Docker is running

Looks all good here - I can run $ docker run -it hello-world correctly now too, and keep moving until 18180 is fixed.

  • Thanks Mike - this got me to a point where things are running, but not sure how my upgrade path will be. Will likely have to reinstall everything :-) but appreciate this workaround! – henry74 Mar 24 '16 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.