Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

Minecraft docker-container refuses connection

$
0
0

So I have this Dockerfile:

FROM openjdk:8u212-jre-alpineLABEL maintainer "cowboy_patrick"RUN apk add --no-cache -U \  openssl \  imagemagick \  lsof \  su-exec \  shadow \  bash \  curl iputils wget \  git \  jq \  python \  tzdata \  rsync \  nano \  sudo \  knock \  ttf-dejavuEXPOSE 25565 25565COPY minecraft /root/minecraftWORKDIR /root/minecraftRUN chmod +x /root/minecraft/start_minecraft.shCMD /root/minecraft/start_minecraft.sh

This just copies an existing world into an alpine with java and executes some prewritten scripts, I had written for running it on a vps (doing automatic backups etc.)

When I execute it with

docker run --network host -p 25565:25565 --name mcs mcserver

I can see the following in the container-dashboard:port forwarded

For good measures you can see my console-output here but it's pretty standard. Just a minecraft-server that boots up.

The only thing I don't understand is why the connection gets refused when I try to join localhost:25565:connection refused

Does anyone have an idea on how I can allow this connection? And in extent allow connections from outside my machine (assuming that port-formwarding and everything works).


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>