nimmis / docker-spigot

A docker container with spigot, builds spigot.jar on first start
175 stars 82 forks source link

How to run in a different port? #51

Closed ghost closed 2 years ago

ghost commented 2 years ago

I am new to dockerizing Minecraft servers, therefore this is the first time I am using this image.

The thing is that I want to run the Spigot server in a port other than the default 25565 since I am running a BungeeCord server. This works fine under my Windows setup, but I can't find a way to make the spigot server run in a different port inside docker.

I tried setting the port to 25566 when first running the container (25566:25566 since I need to run several containers for Minecraft).

It seems to compile the default latest Spigot version just fine (1.17.1 at the moment), but the server appears to be offline in the game.

Given that it is running (I think so?), I guess this is a problem related to changing the docker port for the container.

Attaching the compilation and execution output/log.

Edit: I have not configured or changed anything in the container, I was just testing execution for the first time. And an unrelated question is there a way to auto compile a newer version of Spigot in the container or do I have to manually compile it and then upload it to the container? Thanks in advance.

Compilation: https://pastebin.com/3BdYcgmj Execution: https://pastebin.com/8tWaYkt8

ghost commented 2 years ago

Nevermind. Changing the port when initializing the container didn't create a config file with that port established.