The console output shows that the issue is related to the dos2unix conversion process failing on your mounted weston.ini file (1). This is a known issue that can occur when mounting configuration files as volumes.
Root Cause Analysis
The error message indicates:
dos2unix: problems renaming '/etc/xdg/weston-dev/d2utmpZ3j6ub' to '/etc/xdg/weston-dev/weston.ini': Device or resource busy
This happens because the dos2unix command in the Weston entry script cannot properly process the mounted file (1). When you bind mount a file from the host, it can create permission and file system conflicts during the conversion process.
Solution Options
Option 1: Build Custom Weston Container (Recommended)
For production environments, build your own Weston Docker image with the configuration file included (2):
FROM torizon/weston:$CT_TAG_WESTON
COPY weston.ini /etc/xdg/weston-dev/weston.ini
COPY Loading.png /custom/Loading.png
Option 2: Mount Directory Instead of Individual File
Instead of mounting the individual weston.ini file, mount the entire configuration directory:
services:
weston:
image: torizon/weston:$CT_TAG_WESTON
restart: always
privileged: true
network_mode: host
ipc: host
environment:
- ENABLE_RDP=1
command: >
--developer
--tty=/dev/tty7
--
--use-pixman
volumes:
- /tmp:/tmp
- /dev:/dev
- /run/udev:/run/udev
- /home/torizon/weston-config:/etc/xdg/weston-dev/
- /home/torizon/Loading.png:/custom/Loading.png
cap_add:
- CAP_SYS_TTY_CONFIG
device_cgroup_rules:
- 'c 4:* rmw'
- 'c 13:* rmw'
- 'c 226:* rmw'
- 'c 10:223 rmw'
Create a directory /home/torizon/weston-config/ on your host and place your weston.ini file inside it.
Option 3: Use Alternative Configuration Method
For evaluation and prototyping, you can bind mount the weston.ini file to overwrite the existing configuration (2):
volumes:
- /home/torizon/weston-config:/etc/xdg/weston/
And use the container without the --developer switch:
command: >
--tty=/dev/tty7
--
--use-pixman
File System Considerations
The issue you’re experiencing is related to how Docker handles bind mounts and file operations. The dos2unix command in the Weston entry script tries to modify the mounted file, but encounters permission or file system conflicts (1).
Recommended Approach
I recommend using Option 1 (building a custom container) as it:
- Avoids file mounting conflicts
- Provides better performance
- Is more suitable for production deployments
- Eliminates the
dos2unixconversion issues
The custom container approach ensures that your configuration files are properly integrated into the container image without runtime mounting conflicts.
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.