Recent Discussions
Can't get the RCON-CLI or attach to work on ITZG Minecraft Docker container.
Unanswered
Asiatic Lion posted this in #questions
35 messages
0 views
Asiatic LionOP
I'm trying to attach with "docker <docker name> attach" and I get nothing. When I run "docker exec -i <docker name> rcon-cli" I get a cli, but it's not actually doing anything. I can send command and they go nowhere.
I'm using Portainer to manage my docker containers, not because I want to but because I lose track of everything in the cli if I don't have a gui, so maybe I'm missing a setting or something because of that. I'm not sure.
My compose file looks like so:
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: "FABRIC"
tty: true
stdin_open: true
restart: unless-stopped
MEMORY: "10G"
INIT_MEMORY: "10G"
MAX_MEMORY: "10G"
OVERRIDE_SERVER_PROPERTIES: "true"
ports:
- "25565:25565"
volumes:
- ./minecraft-data:/data
I'm using Portainer to manage my docker containers, not because I want to but because I lose track of everything in the cli if I don't have a gui, so maybe I'm missing a setting or something because of that. I'm not sure.
My compose file looks like so:
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: "FABRIC"
tty: true
stdin_open: true
restart: unless-stopped
MEMORY: "10G"
INIT_MEMORY: "10G"
MAX_MEMORY: "10G"
OVERRIDE_SERVER_PROPERTIES: "true"
ports:
- "25565:25565"
volumes:
- ./minecraft-data:/data
@Ruddy Ground-Dove
Do Docker.
Don’t use RCON.
Also don’t use Portainer. Raw Compose is better and will cause you less problems.
Asiatic LionOP
So docker exec -it works but that gets me into the container. I'm trying to get into the server cli
Ruddy Ground-Dove
That’d be the first command.
Asiatic LionOP
Something happens when I do that, but the commands go nowhere.
Ruddy Ground-Dove
Send screenshot.
Asiatic LionOP
image.png
Checking the logs and in game nothing happens.
Ruddy Ground-Dove
sudo docker ps
Asiatic LionOP
One sec. The normal Control-p Control-q to detach doesn't work and when I close the terminal it shuts down the container when I'm attached like that
idk it's weird
Ruddy Ground-Dove
Mm.
Asiatic LionOP
image.png
It's an annoying name but I run a bunch of servers from time to time so the naming conventions get wacky
Ruddy Ground-Dove
Hmm.
Well, throw container_name: “whatever” into the Compose.
And attach using the service name instead of the container name. That is mc in the stack.
Asiatic LionOP
Error response from daemon: No such container: mc
Where do you want the container_name? Under environment?
Ruddy Ground-Dove
It’s goes on the same layer as environment.
@Asiatic Lion Error response from daemon: No such container: mc
Ruddy Ground-Dove
Oh wait yeah it’s not interpod. Lmao never mind me I actually am stupid today. Very tired it’s 1pm and I should be asleep.
Yeah connect using the container name instead of service name. You should use service name when connecting between pods on the same internal Docker network or Compose stack.
Loading...
Loading...