Failed to create wl_display (No such file or directory)

My application container fails to load. Reviewing the docker logs reveals the following error message:

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.
Aborted

The weird thing is, this configuration has been working on other modules, and it was working before on this module. The Weston container is running, so my container should have a Wayland display to connect to.

When I start my container manually, it runs just fine. It’s only failing at boot.

Could this be an issue with the order in which containers are loaded? My container is set to “depend_on” Weston, so Weston should load first, right? Does Weston actually need to appear first in the docker-compose file?

Here’s my full docker-compose.yml:

services:
  lari2-firmware-1:
    depends_on:
    - weston
    devices:
    - /dev/gpiochip0
    - /dev/gpiochip1
    - /dev/gpiochip2
    - /dev/gpiochip3
    - /dev/gpiochip4
    - /dev/gpiochip5
    - /dev/spidev0.0
    - /dev/spidev1.0
    - /dev/apalis-uart1
    - /dev/apalis-uart2
    - /dev/apalis-uart3
    - /dev/apalis-uart4
    - /dev/ttyUSB0
    image: fbmyers/lari2-firmware-1
    ports:
    - 6502/tcp
    volumes:
    - /tmp:/tmp:rw
    - /dev/dri:/dev/dri:rw
    - /sys:/sys:rw
    - /var/lari:/var/lari:rw
    - /sys/class/pwm/pwmchip0:/sys/class/pwm/pwmchip0:rw
    - /sys/class/pwm/pwmchip2:/sys/class/pwm/pwmchip2:rw
    - /sys/class/pwm/pwmchip3:/sys/class/pwm/pwmchip3:rw
  weston:
    environment:
    - ENABLE_VNC=1
    - ENABLE_RDP=1
    cap_add:
    - CAP_SYS_TTY_CONFIG
    device_cgroup_rules:
    - c 4:0 rmw
    - c 4:7 rmw
    - c 13:* rmw
    - c 226:* rmw
    image: torizon/weston: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'