nimmis / docker-spigot

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

adoptopenjdk no longer available #47

Closed em3e3 closed 2 years ago

em3e3 commented 2 years ago

Dockerfile attempts to apt-get adoptopenjdk, which no longer exists. Suggest apt-get install openjdk-16-jre-headless instead

nimmis commented 2 years ago

It works for me (today), what's your setup and the output openjdk-16-jre-headless would not work as it doesn't contain the Java compiler only the runtime

em3e3 commented 2 years ago

Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-90-generic x86_64) Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2

I'm using the snap version of Docker (yes, I know, bad, bad, bad).

Only two versions of jdk in /etc of the Docker container. Not sure where java-8 came from. drwxr-xr-x 5 root root 4096 Nov 14 02:04 java-16-openjdk drwxr-xr-x 5 root root 4096 Sep 30 2019 java-8-openjdk

And spigot is running, Minecraft world is accessible.

Here's the error I was getting when running spigot container before installing openjdk:

The version you have requested to build requires Java versions between [Java 16, Java 17], but you are using Java 8 Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.

Here's the command I ran to setup the container:

sudo docker run -d -p 25567:25565 --name spigot2 -e EULA=true -v /home/nimmis/mc-srv2:/minecraft -e MC_MAXMEM-8g nimmis/spigot

Yes, I'm running two spigot containers, each on their own port.

ADDED: I did a search for adoptopenjdk in the root OS on the server, and nothing shows up. There's a number of steps required to get adoptopenjdk according to their website, but it doesn't look like that is included in the nimmis/spigot Docker file.

https://adoptopenjdk.net/installation.html#linux-pkg

nimmis commented 2 years ago

you have probably an old cached version of nimmis/spigot running

docker run nimmis/spigot  cat /etc/BUILDS/spigot

shoudl give the following output if you are using the latest version

 Build of nimmis/spigot:latest, date: 2021-07-04T18:54:09Z

If not try to do

docker pull nimmis/spigot
em3e3 commented 2 years ago

Yep, old version:

Build of nimmis/spigot:latest, date: 2019-09-30T19:54:49Z

sudo docker pull nimmis/spigot Status: Downloaded newer image for nimmis/spigot:latest docker.io/nimmis/spigot:latest

Build of nimmis/spigot:latest, date: 2021-07-04T18:54:09Z

What's strange is that it actually worked, once. That threw me off, as well as still learning Docker. Created a new container after the pull, and it's running. Closing the ticket. Thanks!