New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile for standalone use #1875
base: master
Are you sure you want to change the base?
Conversation
Example usage: docker build -t geyser -f standalone.Dockerfile https://github.com/GeyserMC/Geyser.git docker run -p 19132:19132/udp -v `pwd`/geyser:/var/lib/geyser geyser
On behalf of RTM, the person who knows Docker best among us developers:
Said repository: https://github.com/GeyserMC/pterodactyl-stuff/tree/docker-geyser |
|
I had not seen those before — though those are just a wrapper around a shell script that fetches CI artifacts at runtime; that Dockerfile:
Conversely, this PR contains something more like a mainstream Dockerfile in the vein of the official ones on the Hub. I'm not familiar with the Pterodactyl Panel internal architecture, so I can't comment on the interactions between it and Docker or whether this would actually be better for that use-case in the long run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving this a test it works fine, and we can set it up with quay.io so people can get the built docker image. I will add a note about this to the wiki after this is merged and quay.io is setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this PR is old, it would still be useful to the likes of me who want to use Geyser in docker.
COPY . . | ||
|
||
RUN git submodule update --init --recursive &&\ | ||
mvn clean install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geyser uses Gradle now, so this would have to be gradle build instead
RUN git submodule update --init --recursive &&\ | ||
mvn clean install | ||
|
||
FROM adoptopenjdk/openjdk11:alpine-jre |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geyser now uses java 16, soon, java 17? it warned me on my standalone console.
USER geyser | ||
WORKDIR /var/lib/geyser | ||
EXPOSE 19132/udp | ||
CMD ["java", "-jar", "/opt/Geyser/Geyser.jar"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is now called Geyser-Standalone.jar
|
||
FROM adoptopenjdk/openjdk11:alpine-jre | ||
|
||
COPY --from=build ./bootstrap/standalone/target /opt/Geyser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this folder is outdated?
I don't know how widespread use this would get, but here it is if you want it.
If you wanted to give it a test run:
docker build -t geyser -f standalone.Dockerfile https://github.com/JamesTheAwesomeDude/Geyser.git docker run -p 19132:19132/udp -v `pwd`/geyser:/var/lib/geyser geyser