Install Docker On Raspberry Pi 3 B+



Using VNC is a perfect way to access your Raspberry Pi without the need for a monitor, or running a GUI. Ensure We’re Up-To-Date To start, as always, it’s good practice to make sure the system is completely up-to-date before we begin or install any new software. Install Pi-hole. Pi-hole can be downloaded to your Raspberry Pi via a one-step automated install — just open a terminal window and run the following command: curl -sSL bash. You can find more information about setting up Pi-hole on your Raspberry Pi on the Pi-hole GitHub repository here. Now we can wire the camera up to the Raspberry Pi. In this example, we use the Raspberry Pi 3 Model B. It is important to connect the camera in the right way, pay attention in the following image to the orientation of the ribbon cable. The blue side facing towards the USB ports.

The new High Quality (HQ) camera from the people over at Raspberry Pi is now available. And as they say, it is really rather good. It has the option for interchangeable lenses, a 12 MP sensor, a distinct improvement from the previous 8MP V2 camera, and a tripod screw mount. In this post, I’ll walk you through the steps to stream video on Ubuntu Core and how to properly focus the camera for different lenses with and without the C mount.

Why would you want a Raspberry Pi VPN server? The main reason to run your own open source VPN server from an RPi is overall security, which no one can take for granted. If you arrive on a webpage through an open internet connection—one not established with a proxy or a VPN tunnel—chances are the website administrator can get your IP address and determine where you were when you connected. Raspberry Pi 4 is a huge leap forward for single-board computing, it's now a true PC replacement for a wide range of uses at home, in school projects and inside commercial products.

What you will need

If you plan on following along with this guide, this is the list of things you will need:

  • A microSD card (4GB minimum, 8GB recommended)
  • A computer with a microSD card drive
  • A Raspberry Pi 2, 3 or 4
  • A micro-USB power cable (USB-C for the Pi 4)
  • A Wi-Fi network or an ethernet cable with an internet connection
  • A monitor with an HDMI interface
  • An HDMI cable for the Pi 2 & 3 and a micro HDMI cable for the Pi 4
  • A USB keyboard
  • The new HQ Raspberry Pi Camera
  • C and or CS-mount compatible lenses.

Setting up Ubuntu Core with the HQ Camera

First, to get going with Ubuntu we’re going to need to install and set up Ubuntu Core on the Raspberry Pi. The best way to do this is to open the tutorial in a new tab, follow along to where you can SSH into the Pi, and come back when you’re done.

Install Docker On Raspberry Pi 3 B+ Pinout

Once you’re in, we need to enable the camera for the board. This is a little hacky at the moment as you need to go into the config file to do it, but don’t worry. It’s nice and easy and we are working on making this process much more seamless. More on that later.

Install Docker On Raspberry Pi 3 B+

Enable the camera to work with Ubuntu Core

Install Docker Raspberry Pi 3 Buster

Raspberry

Access the uboot config file with this command:

Install Docker On Raspberry Pi 3 B+

Once the file is open, scroll down to the last line and then type the following commands:

This will initiate insertion mode so you can add to the file. Next scroll to the bottom of the file and type:

This is the line that enables the camera. That’s it. Now to save and exit the file hit ‘Esc’ escape on your keyboard to exit insertion mode and type

to save and exit the file. To be clear:

Next, we need to install picamera-demo-application. This is a snap in the snap store developed and maintained by Ogra, a Canonical engineer. To do this use the following command:

Connect the camera and connect to the web

Now we can wire the camera up to the Raspberry Pi. In this example, we use the Raspberry Pi 3 Model B. It is important to connect the camera in the right way, pay attention in the following image to the orientation of the ribbon cable. The blue side facing towards the USB ports.

To connect it in this way, pull the black tab gently upwards until you feel it click. Slot the ribbon, orientated as shown, into the space, and press the black tab back down to secure it.

For clarity, this is an example of how not to connect it (in the wrong port):

Once that’s connected, reboot the Raspberry Pi with:

Wait a few moments and in your browser type:

And you will be able to see what your camera sees in a web page like this:

Focusing with and without the C-mount

Being able to focus the camera, is of course, crucial. For a photography novice like me, it took a while to work out how to do it. The C-mount is a type of mount usually found on 16mm cameras. Of the two lenses I bought, one required the C-mount, the other a CS-mount. A CS-mount lens is designed to be mounted ~ 5mm closer to the image sensor than a C lens. It’s important to note this before playing around with the lenses and misplacing the C-mount bracket and wondering why your 16mm lens won’t focus for an hour or so.

Install Docker On Raspberry Pi 3 B+

What’s next

We are working to do a lot more to improve the user experience of Ubuntu on Raspberry Pi. This tutorial was non-typical. Usually, tutorials live at ubuntu.com/tutorials, where you can find ‘how-tos’ on getting set up with Ubuntu Server, or other projects, like building a Raspberry Pi cluster using MicroK8s.

This tutorial utilises Ubuntu Core, Ubuntu Core is not developer-friendly, we recommend its use for appliances, for fire-and-forget devices and for production. If you want to try other applications or build applications for the Raspberry Pi on Ubuntu we recommend you look into snaps and Ubuntu Server and take it from there.


Ubuntu Desktop for Raspberry Pi

Watch the live event of the 20.10 launch the and find out all the news about the new Ubuntu Desktop image for Raspberry Pi.

Newsletter signup