Running a Simple Container in Torizon OS - Hello World
Overview
Torizon is a new Linux-based software platform that simplifies embedded software development and maintenance, allowing containerized applications to run. Torizon OS uses the Docker container engine, one of the most popular in the market. To learn more about Torizon OS, read the Torizon OS Overview.
A container is a standard unit of software that packages code and all its dependencies, enabling flexible, lightweight, portable and scalable software development. For more information about Docker, visit its official documentation.
In this section, you will test Torizon OS with a hello-world application.
Typographic Conventions
Throughout the Toradex documentation, the following typographic conventions are used:
$ (dollar sign) Command in the host computer (e.g. your PC)
$ Command in your PC
$$ (double dollar sign) Command in a container in the host computer (e.g. your PC)
$$ Command inside a container in your PC
# (hashtag) Command in the target device/board (e.g. Linux terminal)
# Command in the target board, e.g. Colibri iMX6
## (double hashtag) Command inside a container in the target device (Torizon)
## Command inside a container in Torizon
> (greater-than sign) Command in the bootloader (e.g. U-Boot console)
> Command in the Bootloader
No symbol: Command output
$ Command waiting for output
Output
Prerequisites
For this lesson:
- Have both host and target connected to the same network.
- Have your host-target (development PC - Computer on Module) communication setup through SSH using the PuTTY client.
Step 1
Now that you have SSH access to your board, you can fully explore the capabilities of Torizon OS. On the board's terminal, run the Docker Hello World container:
# docker run hello-world
Read the generated prompt to understand what happened and how Docker works.
For more information about this example and additional details on how to use Docker, refer to Docker Get Started page.
This example confirms that Docker is running correctly on the board. You are now ready to begin working with Toradex's Debian images.
FAQ
How relevant is the processor's architecture in containers?
Just like when building regular applications, a container built on an x86 machine will only work on x86 targets. The same is true for ARM and other computer architectures. Both images used in this lesson have been built for a wide variety of architectures, including ARM. Note that there is also a distinction between ARMv7 (32-bit) and ARMv8 (64-bit).