Attaching through docker/podman doesn't work as expected.

I'm setting up a Minecraft server for a mod called Better Than Adventure, which is for quite an old version that doesn't have RCON support. The specific details of the mod shouldn't really matter besides that it's based on Minecraft Beta 1.7.3, and I'm using a fork of fabric known as "Babric" Due to this I tried attaching directly to the server using podman attach server, which shows me the logs but doesn't appear to let me interact with it (I tried running help and ? but neither of them did anything. I don't have much experience self hosting Minecraft servers specifically but I do have a lot of experience with other kinds of servers. This is the Dockerfile I'm running:
FROM eclipse-temurin:17-jre
WORKDIR /server/
CMD ["java", "-Xmx3328M", "-Xms3328M", "-XX:+UnlockExperimentalVMOptions", "-XX:+UnlockDiagnosticVMOptions", "-XX:+AlwaysActAsServerClassMachine", "-XX:+AlwaysPreTouch", "-XX:+DisableExplicitGC", "-XX:+UseNUMA", "-XX:NmethodSweepActivity=1", "-XX:ReservedCodeCacheSize=400M", "-XX:NonNMethodCodeHeapSize=12M", "-XX:ProfiledCodeHeapSize=194M", "-XX:NonProfiledCodeHeapSize=194M", "-XX:-DontCompileHugeMethods", "-XX:MaxNodeLimit=240000", "-XX:NodeLimitFudgeFactor=8000", "-XX:+UseVectorCmov", "-XX:+PerfDisableSharedMem", "-XX:+UseFastUnorderedTimeStamps", "-XX:+UseCriticalJavaThreadPriority", "-XX:ThreadPriorityPolicy=1", "-XX:+UseZGC", "-XX:AllocatePrefetchStyle=1", "-XX:-ZProactive", "-XX:ConcGCThreads=2", "-jar", "fabric-server-launch.jar"]
FROM eclipse-temurin:17-jre
WORKDIR /server/
CMD ["java", "-Xmx3328M", "-Xms3328M", "-XX:+UnlockExperimentalVMOptions", "-XX:+UnlockDiagnosticVMOptions", "-XX:+AlwaysActAsServerClassMachine", "-XX:+AlwaysPreTouch", "-XX:+DisableExplicitGC", "-XX:+UseNUMA", "-XX:NmethodSweepActivity=1", "-XX:ReservedCodeCacheSize=400M", "-XX:NonNMethodCodeHeapSize=12M", "-XX:ProfiledCodeHeapSize=194M", "-XX:NonProfiledCodeHeapSize=194M", "-XX:-DontCompileHugeMethods", "-XX:MaxNodeLimit=240000", "-XX:NodeLimitFudgeFactor=8000", "-XX:+UseVectorCmov", "-XX:+PerfDisableSharedMem", "-XX:+UseFastUnorderedTimeStamps", "-XX:+UseCriticalJavaThreadPriority", "-XX:ThreadPriorityPolicy=1", "-XX:+UseZGC", "-XX:AllocatePrefetchStyle=1", "-XX:-ZProactive", "-XX:ConcGCThreads=2", "-jar", "fabric-server-launch.jar"]
And this is the command I'm using to start it:
podman run -d -p 69:25565/tcp -v /home/false/grey/server/:/server/ --name server server
podman run -d -p 69:25565/tcp -v /home/false/grey/server/:/server/ --name server server
The server is a Raspberry Pi 5 running Diet Pi (Debian 12)
10 Replies
Admincraft Meta
Admincraft Meta6mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by falseinquisition#0
FalseInquisition
FalseInquisitionOP6mo ago
Example of what happens:
No description
FalseInquisition
FalseInquisitionOP6mo ago
If you're unclear on what podman is, it's a drop-in replacement for docker and everything works pretty much exactly the same
SilentBot
SilentBot6mo ago
podman by default attaches in interactive mode You would've had to specifically disable it using --no-stdin to disable console input So unless your fork of fabric or your ssh client is doing something funky, it should just work™️
FalseInquisition
FalseInquisitionOP6mo ago
I am using dropbear currently, maybe I'll try openssh and see if that works properly
SilentBot
SilentBot6mo ago
Are you connecting from Windows? If so, you have ssh.exe available straight from the command line
FalseInquisition
FalseInquisitionOP6mo ago
No I'm connecting from Linux using OpenSSH as my client The SSH server on my Pi is dropbear
SilentBot
SilentBot6mo ago
Got you
FalseInquisition
FalseInquisitionOP6mo ago
Nope, switched from dropbear to openssh on the server and it's still causing issues and vanilla b1.7.3 seems to have the same issue so I have no idea why stdin isn't being processed Just realised I'm a complete dumbass and forgot to make it interactive with -i That instantly solved it
SilentBot
SilentBot6mo ago
Oh, their man says it should be interactive by default But -it is usually what you need in docker At least you got it working though

Did you find this page helpful?