How to use Docker with ROS + real-time kernel? [closed]

asked 2020-01-05 14:17:44 -0600

jakub-kaminski gravatar image

Dear ROS & Docker Users,

tl;dr: How to run Docker with linux real-time kernel (4.18.16-rt9)? What kernel features should I turn on during rt kernel compilation? I would appreciate your help.

The error I get:

$ docker run hello-world
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.


$ docker info
Client:  Debug Mode:
false Server: ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
errors pretty printing info

Preemption Model set during kernel compilation is: Fully Preemptible Kernel (RT) (PREEMPT_RT_FULL) (NEW)

Full description:

Hi, my name is Jakub and this is my first post on the forum. I am happy to change from "read-only mode" and join the community. I am volunteering to set up Docker on Ubuntu 18.04 with real-time kernel 4.18.16-rt9 for a robotic application in an academic setting. Docker will not run critical real-time tasks in this application, but the intention is to deploy partially containerized system on one machine to simplify the setup and testing with different software versions.

Unfortunately, I cannot start Docker on my setup. I think that 4.18.16-rt9 kernel causes the issues, because otherwise Docker works fine when I boot to 5.0.0-37 kernel on this system.

I have already tried the following:

  • fully removed Docker and reinstalled it on my system.
  • made sure that docker group exists and no sudo is required for Docker. Rebooted machine a few times while changing settings.
  • Tried to enable Docker in three ways:

    systemctl enable docker.service
    systemctl start docker systemctl
    enable docker

  • Found relevant unsolved GitHub issue and tied to run the image with --cap-add sys_nice and --privileged options.

  • Checked for some kernel feature required to run Docker (as suggested here) and found that only my 5.0.0-37 kernel was found:

$ find /lib -iname 'aufs' /lib/modules/5.0.0-37-generic/kernel/fs/aufs

Other relevant information:

  • journalctl -u docker.service last lines available here, all the output is here.
$ journalctl -u docker.service  
(I skipped pasting some warning lines)
Dec 17 14:39:56 w530 dockerd[16869]:  
time="2019-12-17T14:39:56.843093125-05:00" level=warning msg="Your ke  
Dec 17 14:39:56 w530 dockerd[16869]:  
time="2019-12-17T14:39:56.843813184-05:00" level=info msg="Loading co  
Dec 17 14:39:56 w530 dockerd[16869]:
time="2019-12-17T14:39:56.882073092-05:00" level=warning msg="Running  
Dec 17 14:39:57 w530 dockerd[16869]:
time="2019-12-17T14:39:57.044629860-05:00" level=info msg="stopping e  
Dec 17 14:39:57 w530 dockerd[16869]:
time="2019-12-17T14:39:57.045272056-05:00" level=info msg="stopping e  
Dec 17 14:39:57 w530 dockerd[16869]: failed to start
daemon: Error initializing network
controller: error  
Dec 17 14:39:57 ...
edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see for more details. by gvdhoorn
close date 2020-01-06 01:55:02.460384


If this issue is not relevant to this ROS Questions collection, please let me know if there are better forums to ask about this problem.

even though you appear to intend to use your setup with ROS at some point in the future, your current issue appears to be with Docker itself at the moment.

This makes it a non-ROS question, which would be better posted on more appropriate fora such as the Docker support forum.

I'm therefore closing your question here.

If it turns out there is a ROS-side to this question, you could edit it to update and we can see whether we should re-open.

Finally: if/when you post on another forum, please post a comment here with a link to your new post so we can keep things connected.

gvdhoorn gravatar imagegvdhoorn ( 2020-01-06 01:54:56 -0600 )edit