installing visual studio code on debian buster and the raspberry pi 4 model b rev 1.4

A long winded title to announce that I’ve managed to create a deb file from Visual Studio Code source, and to install it on the Raspberry Pi 4 8GiB running Debian Buster 64-bit compiled for arm64.

The deb file was built on the Jetson Xavier NX board, then copied to a thumb drive, then moved over via the thumb drive over to the Rasbperry Pi and installed from there. So far it’s behaved reasonably well. I’ve learned quite a bit about the build tools that come with the source. I suppose it’s good that I found some of the directions I did on the web, but now that I’ve gone through this whole process a number of times, what I used to start with short circuits what is available in the source tree cloned from GitHub.

I appreciate that I can use the Jetson NX as a build system. I also appreciate that there is a method in the source tree for building the deb file. That to me is super. Now I can keep up with releases, knowing I can target 64-bit ARM binaries for Debian/Ubuntu.

And speaking of Debian, the 64-bit OS running on the Raspberry Pi now identifies itself simply as Debian.

Once I feel comfortable running the full build suite in Visual Studio Code I’ll post a streamlined how-to for ARMv8/aarch64/arm64. Too many labels, frankly.

installing docker on rasbian 64-bit and the raspberry pi 4 8gb

I will continue to refer to the OS as Raspbian because (1) that’s what they named it when first released and (2) it still says that on the operating sytem. Therefore the name has stuck and still sticks.

Here are the steps to install Docker and the Portainer container that provides your Docker installation with a simple, web-based dashboard.

Update 64-bit Raspbian:

sudo apt update && sudo apt upgrade -y

Install Docker from the Docker website:

curl -sSL https://get.docker.com | sh

Add the pi account to the docker user group so that you can execute docker commands without sudo:

sudo usermod -aG docker pi

Reboot

sudo reboot

Log back in and test Docker by installing and running the following container.

docker run hello-world

The container will run and tell you it was successful with additional information about Docker and its OS.

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.
    (arm64v8)
 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/

To be honest, I haven’t tried the recommendation about running the Ubuntu container, as I don’t know if it there is an ARM Ubuntu container (there is ARM Ubuntu, however) and if it will select the right container if there is such a container.

Install the next two containers. The first is a very simple http container.

docker run -d -p 80:80 hypriot/rpi-busybox-httpd

Navigate to http://localhost with Chromium and you’ll see this:

Now add the dashboard container that implements Portainer for ARM.

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer:arm

Navigate to http://localhost:9000/ and create an admin password for the admin account. Once that is accomplished, you’ll see something very similar to this:


You’ll note that only two containers are listed, not three. That’s because earlier I removed the “Hello World” container. Here’s a detailed listing of the containers.


To manage any of the containers, you select that container’s checkbox. That enables all of the possible action buttons at the top of the page. Finally, here’s a check of the entire system.


The engine overview is a cleaner view of what you can get from the command line. It’s also a validation that the dashboard container is seeing everything it’s supposed to see.

NOTE

If you want any container to restart after a re-boot, then you need to modify the container’s restart policy. Otherwise, on reboot, no containers are running. For example

docker update --restart=always [container ID]

where he container ID can be found with a docker ps from the command line. You can set restart to always from the command line with the docker run command as well.

It’s a limitation to this application I don’t like. I’m looking for something more comprehensive, or else, (shudder) I fork the application and “fix” it myself.