Comments (10)
@Oliver84 in your compose file you'll need these two items:
With that and restarting the container you'll then be able to use docker attach
.
from docker-minecraft-bedrock-server.
Of course @itzg !
I modify my docker-compose to set similar entrypoint
Thanks and regards
from docker-minecraft-bedrock-server.
To get into the shell of a running container you should execute
kubectl exec -it --namespace ${NAMESPACE} ${POD_ID} bash
this opens a bash terminal that you can use to navigate, in the present working directory of the container. YOU NEED the -it flags, the i stands for interactive (I forget what t stands for, but man kubectl
is your friend) from this point you can use the excellent rcon-cli tool by the same author.
Iif you're using docker but not k8s then replace kubectl
with docker
and remove the namespace argument, the pod ID will instead be the UID of the container, I believe you can find this using docker ps
(I may be forgetting some flags)
from docker-minecraft-bedrock-server.
docker attach
should work in some form; however, I haven't experimented to see what combination of parameters need to be set on the container initially. I'm guessing -i
and -t
are probably needed on the docker run
(or the equivalent settings in compose).
With that said, the bedrock server doesn't natively support rcon, which is what gets leveraged in my Java edition image. I'm thinking of enhancing the process wrapper with rcon or rcon-like console support, so that commands can be sent more easily.
from docker-minecraft-bedrock-server.
...as a quick experiment, I started a container with
docker run --rm -it -e EULA=TRUE itzg/minecraft-bedrock-server
and was able to attach and send the "help" command using:
docker attach 3c1633c5e90b
DEBU[0076] Forwarding signal signal="window changed"
DEBU[0076] Forwarding signal signal="window changed"
help
§2--- Showing help page 1 of 18 (/help <page>) ---
/? [command: CommandName]
/? <page: int>
/alwaysday [true|false]
/changesetting allow-cheats <true|false>
/changesetting difficulty <value: Difficulty>
/changesetting difficulty <value: int>
/clear [player: target] [itemName: Item] [data: int] [maxCount: int]
§2Tip: Use the <tab> key while typing a command to auto-complete the command or its arguments
read escape sequence
I then used Ctrl-P
and Ctrl-Q
to detach and leave the container running.
Is that sufficient for your deployment?
from docker-minecraft-bedrock-server.
I was trying to do the same thing. i.e. attach to server console to monitor stuff and issue commands. Would be interested in any progress here. thanks. good work, thanks for this.
from docker-minecraft-bedrock-server.
Of course @itzg !
I modify my docker-compose to set similar entrypointThanks and regards
Can you share how you attached to this with docker-compose? I started the server with docker-compose but when I attached, it's not taking any of my input commands.
from docker-minecraft-bedrock-server.
Hey @itzg, sorry to comment on an old issue, but can I clarify that it's suggested here that I should be able to just use docker attach
and then run commands for the Minecraft server directly in the terminal? I can attach no problem, and have tried with the stdin_open
and tty
options you pointed to in the example compose file, but I just get a regular bash terminal, running help
just shows me Linux commands, and attempting to run any Minecraft commands it tells me they're not found. Have I missed something?
from docker-minecraft-bedrock-server.
I just get a regular bash terminal, running help just shows me Linux commands
In that case the docker attach didn't actually work or you're not doing something right. Make sure you're not doing an exec
which will execute a new shell within the container.
from docker-minecraft-bedrock-server.
you're not doing something right
Yep, I assumed that using the VS Code Docker extension and clicking "attach" on it would run attach, which I guess it does not.
Cheers!
from docker-minecraft-bedrock-server.
Related Issues (20)
- Could not connect: Outdated client! HOT 2
- Container not working with Orbstack, for some reason! HOT 2
- Adjust the `docker-compose` command to `docker compose` in the README file HOT 1
- Missing library libssl.so.1.1 HOT 3
- Server.properties command HOT 3
- Can't connect using domain HOT 1
- Try to install mods World Wide Animal HOT 1
- Investigate issues with mv command during version backup
- Looks like the release of 2024.1.0 is failing HOT 2
- How to get the latest version of 1.20.x.y ? HOT 1
- Oracle Cloud port or address fail HOT 2
- Too many open files on M2 Mac HOT 1
- PS4 can no longer find the Bedrock server HOT 2
- Server disconnect everyone every 30 min HOT 1
- Issues with certain blocks not being available for collections HOT 2
- Nintendo Switch bedrock server over LAN HOT 2
- /bin/sh: 1: /build/install-packages: not found HOT 1
- Could not connect: Outdated client! HOT 4
- Unknown errors using `@minecraft/server-net`. HOT 1
- Sever Property file generation seems to be incorrectly escaping special characters HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-minecraft-bedrock-server.