To summarize the problem I have: I want to execute a command on the minecraft console that is running in the container like when I attach to it in interactive mode but without the need to attach to it.
docker attach container_name
command
detach_from_contaienr
Like running docker exec but it puts the command into the stdin of the programm that is running inside the container like in docker attach.
I simply search a oneliner that does the same. Like in this question
Edit:
echo 'say test' | docker attach <container id>
Gives the Error:
the input device is not a TTY
Edit2: after removing the -t flag on the container linke in this post
echo 'say test' | docker attach <container id>
the command gets to the server as the log reveales but after executing that I am stuck in a blank input because the command doesn't stop somehow
If i now do the double ctrl+c the container stops...
Edit3: I try to execute these commands on the docker host and execute the command in the running spigot minecraft server