docker-minecraft-bedrock-server icon indicating copy to clipboard operation
docker-minecraft-bedrock-server copied to clipboard

How to make someone OP using docker attach

Open survivalbloke opened this issue 5 years ago • 8 comments

Hello! Excellent work on this project. I have read that rcon-cli is not supported and your workaround was to use docker attach. I added the two lines to my compose file and I'm able to attach to the container but I can't figure out how to issue commands. In rcon-cli I would issue /op to set the operator. How can I do that using docker attach?

survivalbloke avatar Mar 29 '20 18:03 survivalbloke

When you attach it won't show a command prompt, but you can start entering commands. For example I op'ed myself here and then used Ctrl-p Ctrl-q to detach:

> docker attach bds-issue34_bds_1
DEBU[0250] Forwarding signal                             signal="window changed"
DEBU[0250] Forwarding signal                             signal="window changed"
op "Itz G"
Opped: Itz G
read escape sequence

itzg avatar Mar 29 '20 18:03 itzg

OK, I will try that when I get back home and let you know how I do. Follow up question: What happens when I update my images(as I do periodically) with docker-compose pull, then recreate them with docker-compose up -d? Will that undo my OP changes?

survivalbloke avatar Mar 29 '20 19:03 survivalbloke

The OP setting is additive, so it's safe to redo the docker-compose up with that.

itzg avatar Mar 30 '20 23:03 itzg

when i attach, and type op or any command nothing happens

haylinmoore avatar Apr 14 '20 10:04 haylinmoore

@herohamp , can you double check you have stdin and tty enabled on the container?

itzg avatar Apr 14 '20 12:04 itzg

sorry i had not added those to the compose, it works now

haylinmoore avatar Apr 22 '20 10:04 haylinmoore

ok so coming from someone that has absolutely no idea what theyre doing with this how do i op someone

Benombino avatar Sep 27 '22 04:09 Benombino