Search by Tags

Container Hello World

 

Your progress

 

Overview

The module is flashed with the Torizon operating system. Torizon is a new Linux-based software platform that simplifies the process of developing and maintaining embedded software and allows containerized applications to run (such as Docker containers).

In this module you will:

  • Test Torizon with a hello-world application
Typographic Conventions

Prerequisites

For this Getting Started Guide:

  • Development computer with Windows 10 Pro / Enterprise / Education.
  • Successfully completed the previous lesson from this guide.

For this lesson:

  • Have your host-target communication setup through SSH (using PuTTY client)
  • Have both host and target connected to the same network

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

Step 1

Now that you have access through SSH, it is possible to fully explore Docker's capabilities. Run the Docker Hello World:

docker run hello-world

Read the generated prompt to understand what happened and how Docker works.

Step 2

For something more ambitious, let's run nginx and serve a static webpage. Run:

docker run -d -p 80:80 nginx

Step 3

Check the board IP with the ip command:

ip addr show eth0

 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:14:2d:4d:c7:30 brd ff:ff:ff:ff:ff:ff
    inet 10.22.1.123/24 brd 10.22.1.255 scope global dynamic noprefixroute eth0
       valid_lft 84549sec preferred_lft 84549sec
    inet6 fe80::1ee0:6425:8c0:92e/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
 

In the example above, we see from the inet parameter that the board IP is 10.22.1.123.

Step 4

In your computer, open a web browser of your choice and use the board IP address as the URL parameter:


  • nginx Server

    nginx Server

Step 5

Visit the Docker Hub, search for any image and try to run it with docker run <image>, or following the image documentation.

Warning: You'll only be able to run containers that support the Arm architecture!

FAQ

How relevant is the processor's architecture in containers?