Can't install docker

I get this message each time. is it possible to install docker on osmc?

Created symlink /etc/systemd/system/ -> /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/ -> /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xe” for details.
invoke-rc.d: initscript docker, action “start” failed.

  • docker.service - Docker Application Container Engine
    Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
    Active: activating (auto-restart) (Result: exit-code) since Thu 2021-02-18 15:42:15 PST; 32ms ago
    Process: 11384 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
    Main PID: 11384 (code=exited, status=1/FAILURE)
    dpkg: error processing package docker-ce (–configure):
    installed docker-ce package post-installation script subprocess returned error exit status 1
    Processing triggers for systemd (241-7~deb10u6) …
    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

It’s hard to speculate without knowing what device you are using or even what version of OSMC you are running.


Run this:

sudo update-alternatives --config iptables

When prompted enter 1 (iptables-legacy), then reboot and try to reinstall docker.

yep, that works. thanks.

1 Like

Hi dillthedog,

sorry to resurrect this old thread. Anyway, could you please elaborate why this is the solution to this docker error?

I am asking because I had a similar problem and I do not understand it.

I am able to install docker as normal. But after a couple of days a single reboot makes docker break on my RPI4 running OSMC.

The docker service status message is quite the same as above:

Jan 04 23:27:25 osmc systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Jan 04 23:27:25 osmc systemd[1]: docker.service: Scheduled restart job, restart counter is at 6.
Jan 04 23:27:25 osmc systemd[1]: Stopped Docker Application Container Engine.
Jan 04 23:27:25 osmc systemd[1]: docker.service: Start request repeated too quickly.
Jan 04 23:27:25 osmc systemd[1]: docker.service: Failed with result 'exit-code'.
Jan 04 23:27:25 osmc systemd[1]: Failed to start Docker Application Container Engine.

The only solution I found up to now is to fully purge docker from the system and reinstall everything.