After searching for a bit, I found a way to send commands to a Resonite headless within Docker programmatically without having to run docker compose attach <container>
and having to manually detach.
You will need the software socat
installed on the host machine, given most of my machines are running Debian, this can be done via apt install socat
.
Now, you can use:
echo 'worlds' | socat EXEC:"docker attach $(docker compose ps -q reso-headless)",pty STDIN
In this command, replace: