Reading time: 3 min.

Need is the mother of invention

The intensive development of software – both computer and mobile, as well as embedded (firmware) – has made the proper selection of development tools, used in everyday work by both developers and testers and managers, particularly important. The level of complexity of tasks faced by people involved in software development is influenced by constant changes occurring both in terms of hardware (new processor architectures, peripheral devices) and software (subsequent editions of operating systems, frameworks, libraries, and even… programming languages).

Programming on PC
Programming software has become remarkably easy to access

All this means that application developers need a method for convenient, fast and, above all, secure testing of their products with the possibility of seamless reconfiguration or restoration of the test environment after a failure. Two technologies come to the rescue – virtualisation and containerisation.

Virtualisation vs. containerisation – which to choose?

Everyone is familiar with the concept of a virtual machine – with the help of software such as VirtualBox or VMWare you can easily “put” your chosen operating system on a computer that is already running another OS.

Ubuntu on VirtualBox
A virtual machine makes it possible to use Ubuntu, for example, on a Windows machine. (Source: https://www.virtualbox.org/)

The purpose of a virtual machine is to isolate the guest system The guest system and the applications running on it are isolated from the host system. Such a solution not only protects the host against potential threats from the inferior system, but also facilitates the work of people who need to use two (or more) operating systems in their activities without the need to constantly shut down the machine and boot another system from the start menu. The software also allows the creation of snapshots, i.e. a record of the virtual machine’s system state, which can be safely and quickly restored, e.g. in the case of a serious error.

Containerisation, on the other hand, provides a lower level of isolation – each container is in fact a “miniature” working environment with its own libraries and applications, but using the hardware and software resources of the main, superior operating system. A great advantage of containerisation is a far-reaching reduction in the demand for computing power and operating memory (as well as disk space) in comparison to virtual machines – and this translates directly into smooth operation and availability of resources for the needs of tested applications.

Contenerisation
“Closing” the programme increases the security of the work on the project

Installing Docker on Raspberry Pi

In terms of hardware, the Raspberry Pi 4 minicomputer is an excellent choice for those wishing to start using containerisation. Docker, one of the most popular container environments, works seamlessly with Raspberry Pi, and has already been packaged with installation packages. To download the appropriate version of Docker, you need to start the Raspberry Pi terminal and enter a command which will automatically download and save a complete installation script to the disk (or, more precisely, a microSD card):

sh get-docker.sh

All of the configuration, as well as downloading the relevant binary files, will be done automatically, so you don’t have to manually install any missing repositories. Finally, it is a good idea to add the current user to the docker group (usually this will just be the default account named pi), created during the software installation:

Creating and using Docker containers

On the Raspberry Pi, Docker works in exactly the same way as it does on other computers – you need to start by downloading a suitable container image, which is a ready-made set of libraries, system files and system tools based on one of the well-known operating systems, such as Debian, Ubuntu or Fedora. For example, to run an Ubuntu image, run the command:

      

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Share:

Picture of Maciej Figiel

Maciej Figiel

Versatile, he is eager to take on challenges because he thinks it is the fastest way to progress. He values contact with nature and an active rest. Automotive and new technologies enthusiast.

See more:

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.