So I have this Dockerfile:
FROM openjdk:8u212-jre-alpine
LABEL 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-dejavu
EXPOSE 25565 25565
COPY minecraft /root/minecraft
WORKDIR /root/minecraft
RUN chmod +x /root/minecraft/start_minecraft.sh
CMD /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:
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:
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).
Go to Source
Author: Cowboy_Patrick