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:
For this Quickstart 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.
On the board, make sure there are no running containers:
# docker stop $(docker ps -a -q)
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.
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
Check that the package you've installed in the Dockerfile is available in this new container:
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.
You can exit the container by either typing
exit on the command-line or by pressing
Ctrl + d: