Rebuild Z-wave routes via automation

The first time around, yes–now I’m using the 32-bit bookworm release.

Not sure why you would change. I used these instructions but left the 64-bit OS. No issues at all on the bullseye release. Install of docker and testing with hello-world went exactly as described. Zwave-JS-UI on Znet via docker - Configuration / Z-Wave - Home Assistant Community

Well… mainly to try to see if it would work. It appears I’ve got a good docker installation now (though I still get the installation error regarding wheel):

I used the python install from those instructions above. The apt repository was causing me issues… maybe my echo entry was bunged up. I don’t know.

Now on to Zwave JS UI…

I’m not sure why you would install python. The docker container will have all that embedded. That’s why docker is used.

You’re using an unsupported and obsolete version of Docker Compose. It is not installed via Python.

https://docs.docker.com/compose/install/

Sorry you having trouble based on my recommendation. I do this a lot so it’s a little easier for me now since I had same problems many times and now just now what to check.

My guess is you don’t have repository installed or properly setup. But this is a huge guess. It is part of the instructions in the docs so either you did it and know or missed it and will find it.

Also, I assume you “sudo apt update” after setup repository. Pretty sure that’s in docs but that will also cause docker package to be missing.

Also, you don’t need docker desktop but if you install it it works same, just extra stuff installed.

The instructions here say, “These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Docker Compose plugin.” Well… the Docker Engine install is where I’m falling down. Would the Docker Compose Standalone work?

For the Engine install… it’s possible I’m getting this command wrong:

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

What’s the proper way of entering this at the command line?

Not at all. I really appreciate you hanging with this thread and responding. In case it’s not obvious, I do not Linux. A couple of times a year–or less–I find a need for it and have to re-learn the basics. I don’t think I’ve fired up an imager in at least a year.

Yes, every time.

But your screenshot shows a successful docker run hello-world. What’s exactly the problem with the Docker install? What does docker version show? There is no Python involved in the official Docker Engine instructions. Also looks like the default instructions include the current Docker Compose anyways.

Yes, and that was after installing what you said was an unsupported and obsolete version of Docker Compose. So I decided to start over. I’d like to get the installation “correct,” so I can keep up with updates, etc.

Sorry, I’m obviously confused. If you are running any Python commands, then yes you are installing outdated software. If you followed the install docs posted earlier, which don’t involve Python, then you should have a good install. You simply need to run docker compose to use it.

I’ve just re-imaged my SD card with the 32-bit RPi OS. I’ve attempted to follow the instructions here to install Docker Engine, but it fails with the errors I posted in this comment.

I only got a successful install by using python, which is apparently the wrong way to go.

Got it, sorry for the confusion.

Did you run sudo apt-get update after setting up the sources?

ls -all /etc/apt/sources.list.d/docker.list

And

cat /etc/apt/sources.list.d/docker.list

Post results of both of those
I suspect the sources file is wrong somehow

I have run it as it’s expressed in the various instructions… whether that’s after setting up the sources, I’m not sure.

After flashing the OS, I run:

sudo apt update
sudo apt upgrade

You’ve said you did step 1 to configure the sources, but did you do step 2? It must be done after setting the sources.

I started to type out the process I’m following earlier on… but I realized it was starting to look like the outdated instructions that I’ve referenced, in that one day, this stuff will no longer be valid… so why post it?

Well, I’ll post it here as a means to get where I’m going. With a fresh flash of OS, I run:

sudo apt update
sudo apt upgrade

Then I follow the instructions here, starting with:

for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

…to remove the packages. The command line reports back that I don’t have any of those packages installed. Good. So then I execute these commands:

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/raspbian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

All good so far. Here’s a copy-paste from my command line:

x@xxxxxxxx:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.com/debian bookworm InRelease
Hit:2 http://raspbian.raspberrypi.com/raspbian bookworm InRelease
Reading package lists... Done
W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is sto                                                                             red in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION se                                                                             ction in apt-key(8) for details.
x@xxxxxxxx:~ $ sudo apt-get install ca-certificates curl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20230311).
curl is already the newest version (7.88.1-10+rpi1+deb12u8).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
x@xxxxxxxx:~ $ sudo install -m 0755 -d /etc/apt/keyrings
x@xxxxxxxx:~ $ sudo curl -fsSL https://download.docker.com/linux/raspbian/gp                                                                             g -o /etc/apt/keyrings/docker.asc
x@xxxxxxxx:~ $ sudo chmod a+r /etc/apt/keyrings/docker.asc
x@xxxxxxxx:~ $

Here’s where things get wonky:

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

I type this as entered; echo \ followed by a hard return, followed by "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian \ and another hard return, then sudo tee /etc/apt/sources.list.d/docker.list > /dev/null and another hard return.

I’m probably doing this step incorrectly. It’s not clear to me how the echo command is supposed to be entered.

You’re supposed to enter it exactly as it is shown. Are you running this from a console where copy and paste is not an option? Did you inspect the contents of /etc/apt/sources.list.d/docker.list to ensure it shows the expected values?

Did you actually run sudo apt-get update after writing the docker.list file yet? That question was not answered. :joy: Do you have the output of running that command?

1 Like

OK–I’ve just pasted exactly as above into the command line. Here’s the result (with the ls & cat commands @tmjpugh recommended:

x@xxxxxxxx:~ $ echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
x@xxxxxxxx:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.com/debian bookworm InRelease
Get:2 https://download.docker.com/linux/raspbian bookworm InRelease [26.6 kB]
Hit:3 http://raspbian.raspberrypi.com/raspbian bookworm InRelease
Get:4 https://download.docker.com/linux/raspbian bookworm/stable armhf Packages [32.2 kB]
Fetched 58.9 kB in 2s (38.5 kB/s)
Reading package lists... Done
W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
x@xxxxxxxx:~ $ ls -all /etc/apt/sources.list.d/docker.list
-rw-r--r-- 1 root root 117 Dec 12 15:29 /etc/apt/sources.list.d/docker.list
x@xxxxxxxx:~ $ cat /etc/apt/sources.list.d/docker.list
deb [arch=armhf signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian   bookworm stable

How does this look so far?

Yes, sure did, see above.

Look at what you posted previously

This shows it is now looking at docker lists
This looks correct. Just keep following install docs

1 Like

Success, I think:

x@xxxxxxxxx:~ $ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2d3d56bba6ab: Pull complete
Digest: sha256:5b3cc85e16e3058003c13b7821318369dad01dac3dbb877aac3c28182255c724
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm32v7)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/
For more examples and ideas, visit:
 https://docs.docker.com/get-started/

I suspect my issue was in the echo command. I do wonder about this:

Unable to find image 'hello-world:latest' locally

…since I saw the same thing when installing with Python, but it looks like all is right with the docker package.

NOW… on to Zwave JS UI. Hopefully this goes as smoothly…