I found a few issues on the docker-compose.yml
file generated by vscode Torizon IDE/moses (F1: Torizon : export docker-compose file → choose release or debug)
1/ For the release configuration, the service depends on itself (depends_on
…) which results in an error when invoking docker-compose up
(this problem does not show on the debug configuration).
Here is the file snipet:
# docker-compose.yml
services:
phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911:
depends_on:
- phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-baef-1599a9e43-4a8a911
- weston
2/ I use the application.dockercomposefile
field to specify a custom file located in appconfig_0/docker-compose-usbcam.yml
. The file is correctly taken into account in the debug configuration but not in the release configuration.
3/ application.extraparms
in the IDE is not taken into account in both release and debug configuration. Maybe there is a “a” missing ? (documentation in Torizon IDE Backend Architecture and Internals | Toradex Developer Center indicates application.extraparams
but the field name in the IDE cannot be changed)
Of course, I understand that I can edit the generated docker-compose.yml
file but I am looking for a cleaner solution.
Files are given below :
My custom file in appconfig_0/docker-compuse-usbcam.yml
(I added custom volumes, ports, network_mode device_cgroup_rules and user)
# docker-compose-usbcam.yml
services:
phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911:
depends_on:
- weston
devices: []
image: phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911
ports: 5025
network_mode: "host"
volumes:
- /tmp:/tmp:rw
- /dev:/dev:rw
- /run:/run:rw
device_cgroup_rules:
- c 189:* rmw
- c 81:* rmw
user : 0:0
weston:
cap_add:
- CAP_SYS_TTY_CONFIG
device_cgroup_rules:
- c 4:0 rmw
- c 4:7 rmw
- c 13:* rmw
- c 199:* rmw
- c 226:* rmw
environment:
- ACCEPT_FSL_EULA=1
image: torizon/weston-vivante:2
network_mode: host
volumes:
- source: /tmp
target: /tmp
type: bind
- source: /dev
target: /dev
type: bind
- source: /run/udev
target: /run/udev
type: bind
version: '2.4'
File generated by moses in release configuration
It is not correct : service depends on itself and custom specifications are not added
# docker-compose.yml
services:
phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911:
depends_on:
- phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-baef-1599a9e43-4a8a911
- weston
devices: []
image: phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911
ports: []
volumes:
- /tmp:/tmp:rw
- /dev/dri:/dev/dri:rw
- /dev/galcore:/dev/galcore:rw
weston:
cap_add:
- CAP_SYS_TTY_CONFIG
device_cgroup_rules:
- c 4:0 rmw
- c 4:7 rmw
- c 13:* rmw
- c 199:* rmw
- c 226:* rmw
environment:
- ACCEPT_FSL_EULA=1
image: torizon/weston-vivante:2
network_mode: host
volumes:
- source: /tmp
target: /tmp
type: bind
- source: /dev
target: /dev
type: bind
- source: /run/udev
target: /run/udev
type: bind
version: '2.4'
File generated by moses in debug configuration
It seems correct : debug service depends on release service. Here the release service takes the custom parameters into account.
# docker-compose.yml
services:
phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_debug_513050ae-f541-4a8a-baef-1599a9e43911:
depends_on:
- phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911
- weston
devices: []
image: phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_debug_513050ae-f541-4a8a-baef-1599a9e43911
ports:
- 6502/tcp
volumes:
- /tmp:/tmp:rw
- /dev/dri:/dev/dri:rw
- /dev/galcore:/dev/galcore:rw
- /home/torizon/phosddvr:/phosddvr:rw
- /home/torizon/phosddvr_core:/phosddvr_core:rw
phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911:
depends_on:
- weston
device_cgroup_rules:
- c 189:* rmw
- c 81:* rmw
devices: []
image: phosddvr_arm64v8-qt5-vivante-no-ssh_bullseye_release_513050ae-f541-4a8a-baef-1599a9e43911
network_mode: host
ports: 5025
user: 0:0
volumes:
- /tmp:/tmp:rw
- /dev:/dev:rw
- /run:/run:rw
weston:
cap_add:
- CAP_SYS_TTY_CONFIG
device_cgroup_rules:
- c 4:0 rmw
- c 4:7 rmw
- c 13:* rmw
- c 199:* rmw
- c 226:* rmw
environment:
- ACCEPT_FSL_EULA=1
image: torizon/weston-vivante:2
network_mode: host
volumes:
- source: /tmp
target: /tmp
type: bind
- source: /dev
target: /dev
type: bind
- source: /run/udev
target: /run/udev
type: bind
version: '2.4'
Best regards,
Fabian