Search by Tags

Install the Build Environment for Torizon

 

Your progress

 

Overview

To develop applications for Torizon, you need to have some prerequisites installed in your development PC. That means installing Docker and enabling Arm emulation. See more information on Configure Build Environment for Torizon Containers.

In this section, you will:

  • Install Docker and enable Arm emulation on your PC.
  • Verify if Docker is correctly installed on your PC.
  • Get used to Docker's official documentation.
Typographic Conventions

Prerequisites

For this Quickstart Guide:

  • Development computer with Ubuntu 18.04 LTS. Warning: Commands and instructions may vary slightly on other Ubuntu releases and Linux distributions.
  • Successfully completed the previous lessons from this guide.

Note: Carefully read this module's cover page by clicking on "Module 2: First Steps with Torizon" on the left menu bar before starting this lesson.

Step 1

Head to the Docker Hub website and create an account.

Step 2

You need to install Docker on the host machine to be able to synchronize with your Docker Hub account on the next lessons.

To install Docker follow the instructions on the Official Docker Page.

Step 3

As mentioned in Docker's documentation, it is possible to add your user to the docker group to avoid needing root privileges.

Before you proceed, it is recommended checking your OS username:

$ whoami

Use the addgroup command:

$ sudo addgroup <your username> docker

Warning: You need to log-out and log-in to the Linux sessing (or reboot machine) after the commands above for the changes take effect.

Step 4

On your computer terminal, execute:

$ docker --version

This lets you check whether the installation was successful or not.

Step 5

Enable Arm emulation in your PC:

$ docker run --rm -it --privileged torizon/binfmt

Warning: This operation will run a privileged container, it will run for the time required to enable Arm emulation using binfmt. It should be a safe operation. Note: Enabling Arm emulation through this method is NOT persistent. After reboots, you have to run this command again to re-enable Arm emulation.

Note: This container will enable binfmt_misc on your Linux machine, which allows you to seamlessly run arm32v7 and arm64v8 binaries on your PC. This is necessary in order to cross-build containers for architectures other than x86 (your development PC). To read more about binfmt_misc, visit the Kernel Documentation.

Step 6

Make sure you can run the hello-world image on your Linux PC before going to the next lessons:

$ docker run hello-world

FAQ

Is the hello-world image the same as the one used on the last module?
Are you having problems with Docker?