Colibri iMX6DL 512 MB IT v1.1B
Colibri Evaluation Board
TorizonCore Upstream 5.6
Hi,
This is a follow up to an earlier issue:
Proper method of using docker run command - Technical Support - Toradex Community
I am still trying to auto start my docker container with no luck.
I would first like to verify that I can get a container running using the docker run
command.
I am sure there is something very basic that I am not understanding…
Here is what I have tried:
I run my code in debug mode from vscode. I can see the code is working properly in debug mode, and it outputs printf statements to the terminal, and it outputs a log file called data.json to the ~/logs folder as my application should.
I then do a docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
17d2f91749b4 9df463b4eba6 “/bin/sh -c 'stdbuf …” 43 seconds ago Up 40 seconds emerablockenergybox_arm32v7-debian-no-ssh_bullseye_debug_69ac5093-51e4-4f03-8827-ec9f9390dfe3_latest_instance
Now I want to be able to run this image on startup. First question is, will the container stick around after a reboot? My understanding is “no”. So somehow I need to reboot and see that the image is still there. My understanding is that an image is stored in some sort of repository, while the container is just an instantiation of that image…
I do a docker image ls
(or just docker images
) and I see it there:
REPOSITORY TAG IMAGE ID CREATED SIZE
emerablockenergybox_arm32v7-debian-no-ssh_bullseye_debug_69ac5093-51e4-4f03-8827-ec9f9390dfe3 latest 9df463b4eba6 2 weeks ago 97MB
torizon/weston 2 829f5eb1882b 3 weeks ago 309MB
torizon/debian 2-bullseye 045ef1b3dc3f 5 weeks ago 62.6MB
And after a reboot, I can still see that image. Terrific.
Now to run that image from a command line.
(I also tried this from root, but is that necessary? my username is root in the configurations settings since I am using CAN bus)
I have used the vscode F1 to get the Torizon: export docker command line
docker run --rm -itd --network 'host' --volume /dev:/dev --volume /home/torizon/logs:/home/torizon/logs --volume /run/udev:/run/udev --volume /tmp:/tmp --volume ContainerVolume:/NewVolume --volume /home/torizon/EmeraBlockEnergyBox:/EmeraBlockEnergyBox:rw --device /dev/spidev3.0:/dev/spidev3.0 --device /dev/colibri-i2c:/dev/colibri-i2c --device /dev/gpiochip0:/dev/gpiochip0 --device /dev/gpiochip1:/dev/gpiochip1 --device /dev/gpiochip2:/dev/gpiochip2 --device /dev/gpiochip3:/dev/gpiochip3 --publish :6502/tcp --publish 8080:8080/tcp emerablockenergybox_arm32v7-debian-no-ssh_bullseye_debug_69ac5093-51e4-4f03-8827-ec9f9390dfe3
I tried with and without adding the --rm and -itd options which I understand are to remove the container upon exit (rm), detach the container so I can still use my existing CLI (-d) and not too sure what -it does…
by the way, I get the following warning, not sure if its normal:
WARNING: Published ports are discarded when using host network mode
e181871bacfc7467687b0cea4755bdec66b92246d135dfd2d92473b97a2cf25c
then I do a docker ps and see my containerID e181871bacfc and try to follow it using
docker logs --follow e181871bacfc
but all I get is:
gdbserver: Error disabling address space randomization: Success
Process /EmeraBlockEnergyBox/EmeraBlockEnergyBox created; pid = 10
Listening on port 6502
also cannot see my data.json file updating…
Can you tell me what I am doing wrong?
I am also having trouble compiling and installing in release-mode. I did a Torizon: switch to release mode but now I dont see what I am supposed to do to get it loaded onto the target (run without debug gives the following error)