Search by Tags

Deploy to the Target

 

Your progress

 

Overview

Since you have built your own container image in the previous lesson, now it is time to deploy and run it on the computer on module.

In this section, you will:

  • Pull the generated image from Docker Hub.
  • Run the image on the device.


Typographic Conventions

Prerequisites

For this Quickstart Guide:

  • Development computer with Windows 10 version 2004 (a.k.a. May 2020 update) or higher.
  • Successfully completed the previous lesson from this guide.

Note: Carefully read this module's cover page clicking on "Module 3: Creating my Own Container" on the left menu bar before starting this lesson.

Step 1

On the board, make sure there are no running containers:

# docker stop $(docker ps -a -q)

Step 2

Pull the image you just pushed to Docker Hub (See the previous lesson if you didn't) :

# docker pull <username>/qs-torizon

You can use the same command above to pull new container image versions every time a new one is pushed to Docker Hub.

Step 3

The following command starts a new container based on the Docker image and opens the new container's terminal:

# docker run --rm -it -v /var/run/dbus:/var/run/dbus -v /dev:/dev <username>/qs-torizon

Step 4

Check that the package you've installed in the Dockerfile is available in this new container:

## nano

You are now inside the nano text editor. Press Ctrl + x to exit it.

Note: Please, note that all the changes made in a container after its creation will be lost when the container exits. To keep data, one needs to use methods to store data outside the container, for example, by using bind mounting.

Step 6

You can exit the container by either typing exit on the command-line or by pressing Ctrl + d:

## exit

FAQ

What does docker ps -a -q do?