Along with TorizonCore, Toradex provides a default Debian-based container as a sort of friendly starting environment. It is possible to choose either Weston Wayland or X.org as the graphical server, though we warn that the X.org-based LXDE (the Lightweight Desktop Environment for X.org) container is experimental and may not be supported in the future. In this article we go through how to start using the proposed containers.
This article complies to the Typographic Conventions for Torizon Documentation.
To have a better understanding of this article the following prerequisites are proposed:
docker runcommand options.
The container is Debian buster release based, featuring the Weston Wayland compositor. To pull the container and start it on the module, choose your hardware from the tabs below and execute the command:
# docker run -d -it --restart=always --privileged -v /tmp:/tmp \ torizon/arm32v7-debian-weston:buster weston-launch --tty=/dev/tty7 --user=root
# docker run -d -it --restart=always --privileged -v /tmp:/tmp \ torizon/arm32v7-debian-weston:buster weston-launch --tty=/dev/tty7 --user=root -- --use-pixman
Note: Currently Weston requires an input device being available (e.g. USB Keyboard/Mouse).
This will ask Docker to run a container using the
torizon/arm32v7-debian-weston:buster image. Since the image is not preinstalled, it will get downloaded from Docker Hub and installed on the module. This will require an internet connection on the device and may take a few minutes. It will start Weston (HDMI on Apalis iMX6, parallel RGB on Colibri iMX6/iMX7). Connecting to the device over serial/SSH will allow access to the base TorizonCore console, not the actual Debian container console.
On modules without GPU like Colibri iMX7/iMX6ULL you must use
weston-launch --tty=/dev/tty7 --user=root -- --use-pixman to start Weston with Pixman.
Weston creates a Unix socket file (typically
0-runtime-dir) in /tmp. By bind mounting /tmp into a second container, a Wayland client application can access the Wayland compositor despite being in separate containers. The Wayland client application will talk to Weston (the Wayland Compositor) through the Unix socket file and draw in a window on Weston. E.g. this example reuses the same image to run a second container, but this time using
# docker run -d -it --restart=always --privileged -v /tmp:/tmp \ torizon/arm32v7-debian-weston:buster es2gears_wayland
To get a shell inside the container
docker exec can be used:
# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS 61b85bc37644 torizon/arm32v7-debian-weston:buster "/usr/bin/entry.sh w…" 2 hours ago Up 2 hours # docker exec -it 61b8 /bin/bash
This will create a prompt with root privileges inside the container.
The container is Debian buster release based, featuring an X-Server desktop as well as an internet browser. To download this container enter the following:
# docker run -d -it --restart=always --privileged -v /var/run/dbus:/var/run/dbus \ -v /dev:/dev torizon/debian-lxde:buster startx
This will run a container using the
torizon/debian-lxde image. It will start a Debian LXDE environment (HDMI on i.MX6, parallel RGB on i.MX 7). Connecting to the device over serial/ssh will allow access to the base TorizonCore console, not the actual Debian container console.
The article Install Debian Packages on Target shows how to install Debian packages on the target and create a new Docker image from it.