docker escape code doesn't work properly #45
Replies: 3 comments
-
I can't seem to reproduce this. Logs from Ubuntu:
After cancelling the container the hlds client also shuts down. This might be a system specific thing, but hard to tell... 🤔 You may want to try pruning any lingering containers as it may cause the Docker process to slow down. You can try |
Beta Was this translation helpful? Give feedback.
-
oh sorry, i forgot to mention i was doing compose up with the -d flag, to start it detached. from what i can find online, once i attach back into the container, ctrl p q should spit me back out of the container if i don't start detached, then ctrl c just kills it as you said |
Beta Was this translation helpful? Give feedback.
-
Ah gotcha. I don't think this is a problem with the container directly, just how the commands are being used. The following worked for me using the docker run -d -ti \
--name hlds \
-v "$(pwd)/config:/temp/config" \
-v "$(pwd)/mods:/temp/mods" \
-p 27015:27015/udp \
-p 27015:27015 \
-p 26900:26900/udp \
-e GAME=${GAME} \
jives/hlds:valve \
"+log on +rcon_password changeme +maxplayers 12 +map crossfire" Results:
I'm also able to execute any combination of stop, kill, etc via
For the inputs to work correctly with docker compose, start the server with Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
What happened?
the default code to escape a docker container is ctrl p q, but something about the HLDS just eats that input instead of letting docker take care of it. currently i can just press ctrl c three times and that works, but it feels wrong.
similarly (but this might just be an HLDS thing, unrelated to the docker image), i cant figure out how to gracefully exit the container. i've tried every variation of
stop
,kill
,quit
,end
i can think of, but there's nothing. ideally ctrl c would take care of that, which is the behavior when i run the HLDS executable directly. so i justdocker kill
it.if any of this is intended/known won't fix, it should probably be put in the docs somewhere (or maybe i just missed that)
Approach
I am using a pre-built image on Dockerhub (jives/hlds)
What games are you trying to run?
Half-Life Deathmatch (valve)
Do you have custom server configs or mods installed?
Docker Logs
No response
Docker Command
No response
Beta Was this translation helpful? Give feedback.
All reactions