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.