Proc command in Docker?

De
- in Servers
18

I have a Minecraft server running in a Docker container - but now, without entering the Docker container, I would like to execute a Minecraft command via exec. According to forums, this should work like this:

docker exec -it NAME echo "player name"> / proc / PID / fd / 0
Unfortunately, nothing happens, and no value is returned to me (instead of PID, of course, is the debugging PID)

have synonymous s.mehren places

\ n
and

\ r
tried.

The server continues to run, but the command is not executed.

Ab

Try "docker exec -it NAME sh -c" echo "op username"> / proc / PID / fd / 0 ".

From the Docker documentary:
COMMAND should be an executable, a chained or a quoted command will not work. Example:

docker exec -ti my_container "echo a && echo b"
do not work, but

docker exec -ti my_container sh -c "echo a && echo b"
want.

De

Unfortunately, it does not work, but sometimes the right way the output was different.

Ab

With pleasure.

De

Ne other idea is definitely not or? ^^

De

*Thank you.

Ab

What comes as output?
I suspect the use of "" within the "" makes problems. You have to escape with \ possibly escapes.

De

Can be good, as I just forgot a typo "- has opened the Minecraft Console - but no command executed automatically

De

* but if I enter something there again not hm

Ab

This is not how Docker works…
Try sh -c "echo \" op player name \ "> / proc / PID / fd / 0"

De

Unfortunately not: /

Ab

Then optionally:
'sh -c echo' op player name "> / proc / PID / fd / 0 '

De

But thank you - now I know at least that it is irgedie - and you do not have to create an extra script of the ne PIPE udn cat, etc. All created by which I have a clue.

De

Hm ne irgedwie not HM does not matter if I try again differently, or must use rcon

Ab

Yes, without having the system in front of me, the debugging is a bit difficult.
Look again at the official Docker documentary, maybe you can find something else.

De

What kind of system - did you program a Minecraft web panel? Or what do you mean?

Ab

No, I mean without being able to try out the commands against the system you are using, it is unfortunately a bit difficult and in some cases empty.
Possibly. Does Docker help you in debug mode, then maybe you'll get one or two hints.

De

Oh so ok jo thank you

De

Ah have just seen in another forum that there has also been someone trying to execute a command via / proc in a container… Had nothing to do with MC, but it may be the vltt Proc does not work in docker containers?