Cannot install Docker on Raspberry Pi2 with OSMC

Hi there,
recently I couldn’t start osmc for some strange error and I had to make the system new.
I installed version 20200204 and then tried to install docker as described here with the convenience script exactly as I did beginning of the year.

Unfortunately that does not work. It shows the error:

osmc@pimedia:~$ curl -fsSL https://get.docker.com -o get-docker.sh
osmc@pimedia:~$ sudo sh get-docker.sh
# Executing docker install script, commit: 1b02882d63b9cfc484ad6b0180171c679cfe0f3a

ERROR: Unsupported distribution 'osmc'

Actually I don’t understand how that failure can occure because it worked last time and looking through the script I find:

if [ -r /etc/debian_version ] && [ "$lsb_dist" != "ubuntu" ] && [ "$lsb_dist" != "raspbian" ]; then
				if [ "$lsb_dist" = "osmc" ]; then
					# OSMC runs Raspbian
					lsb_dist=raspbian

I hope someone can help? Is there lately a failure in the script? or is there a workaround?

The code is a bit iffy WRT OSMC. The block of code you highlight is only run if this check:succeeds:

    # Check for lsb_release command existence, it usually exists in forked distros
    if command_exists lsb_release; then

but the whole premise is questionable (as is the assertion that “OSMC runs Raspbian”). On my installation of OSMC (installed from a 2020.01 image), there is no lsb_release command, so the lsb_dist=raspbian line is never entered.

The least-hassle workaround is to install the lsb-release package – but the the real problem is with the shell script.

OSMC is not based on Raspbian for any model other than 0/1

For a while, I thought we should implement lsb_release but thought the needed upstream packages were quite heavy.

This doesn’t seem to be the case, so I think we should:

  • Depend on lsb_release in base-files-osmc
  • Submit a PR to Docker so that we only use raspbian if osmcdev=rbp1

Thoughts?

Sam

If instaling the lsb-release package is actually useful then fine, but not simply to make a workaround for Docker code.

Absolutely, and OSMC needs to be treated as Debian, or it’ll fall though their logic.

(BTW, the Docker repo does seem to have Debian armhf code.)

Yes, apart from on Pi0/1 where we want to identify as Raspbian.

Hi,
thanks for your fast reply. That would be great if it will work. I really like OSMC because of the ability to install many other programs. I am running some software like OpenHAB in parallel to OSMC and found problems during OSMC updates when not running it in docker.

So will it work if I install lsb-release? Or is there a better short term workaround?
Actually I had the thing up and running from beginning of this year until my SD-card crashed :-(. I took notes on what I did, but obvioulsy missed an important part.

Running OSMC and Openhab on a rpi ? that pretty heavy for the poor rpi

any progress here?

Heavy? OpenHAB and OSMC run perfectly in parallel. Never saw any temperature problems or slow reaction.

Btw: just installing lsb-release package helped. I was able to install docker and then openahb. Seems to run fine and stable.
Finally my wife is happy and I can control my home by voice once again.

Ok so there is nothing really required from OSMC?

Hi

Hopefully the issue is now addressed with the following commit:

I’d appreciate it if you could test this and provide feedback before we potentially release this as an update to other users. To test this update:

  1. Login via the command line
  2. Edit the file /etc/apt/sources.list
  3. Add the following line: deb http://apt.osmc.tv stretch-devel main
  4. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  5. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.

Any news about docker’s installation script? lsb-release package is the only thing needed?
Thanks for your reply

Have you tried it? (lsb-release is installed on my Pi3.)

For me lsb-release was the only thing needed to make the docker installation script working.
I followed that instruction: Install Docker Engine on Debian
Unfortunately I couldn’t try above fix. I have only one Raspi, which is running OpenHAB for controlling my home by voice and OSMC with some extra programs added, to use the Harddisk attached also as a NAS. The content for OSMC automatically synchronises with my computer. So it is a work of minimum one day if something crashes to have a fresh installation and everything up and running.

Just wonder how can I check that lsb-release is installed on current version of osmc? We are on buster now, aren’t we? the stretch-devel source @sam_nazarko provided above is still needed?
Thanks for reply

I don’t seem to be able ti install docker using their script… how did you do? Apart from adding lsb-release to osmc, I mean, which I did but then the docker daemon is not running… :thinking:

dpkg -l lsb-release

No.

ok thanks a lot! I have got lsb-release and I am trying to install docker but after I launch the script I got “dpkg returned an error code (1)” message.
If I try docker run hello-worldI got Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
What should I do?

  1. Post full logs.
  2. Show the full output from running the command.