At startup system loads services from the
docker-compose.yml
version: "2.4"
services:
weston:
#... (environment)
container_name: weston
image: ibragimovingasm/nobilis-weston
#... (bindings)
cap_add:
- CAP_SYS_TTY_CONFIG
command: --developer weston-launch --tty=/dev/tty7 --user=torizon
# Add device access rights through group...
portainer:
# ... (typical)
nobilis-client:
container_name: nobilis-client
image: ibragimovingasm/nobilis-client
security_opt:
- seccomp:unconfined
network_mode: host
volumes:
- type: bind
source: /tmp
target: /tmp
- type: bind
source: /var/run/dbus
target: /var/run/dbus
- type: bind
source: /dev/dri
target: /dev/dri
- type: bind
source: /dev
target: /dev
- type: bind
source: /run/udev
target: /run/udev
- type: bind
source: /sys/class/gpio
target: /sys/class/gpio
- type: bind
source: /home/torizon/nobilis_work_dir/data_pers.sqlite
target: /opt/Nobilis_client/bin/data_pers.sqlite
- type: bind
source: /home/torizon/nobilis_work_dir/settings.xml
target: /opt/Nobilis_client/bin/settings.xml
devices:
#...
privileged: true
depends_on:
- weston
shm_size: '256mb'
device_cgroup_rules:
- 'c 4:* rmw'
- 'c 13:* rmw'
# ... for /dev/dri devices
- 'c 226:* rmw'
volumes:
portainer_data:
weston start OK - display resolution, background
but Qt/QML application fails with
~$ docker logs nobilis-client
QML debugging is enabled. Only use this in a safe environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, xcb.
/entrypoint.sh: line 4: 7 Aborted (core dumped) ./Nobilis_client --arch ixora
If I login to the ssh terminal, stop weston and run the same docker-compose.yml then weston and application start successfully.
In the docker-compose.yml I have set depends_on: weston
I use command: --developer weston-launch --tty=/dev/tty7 --user=torizon because I could not set resolution without --developer yet
I try to add into entrypoint.sh of application
sleep 8
it starts. But it is the wrong way.
Obviously, weston does not ready yet at the moment of the request for service resources.
But depends_on: weston is not enough for waiting for the readiness of the service.
How to define the right sequence of starting weston and Qt GUI application?