Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JamesTheAwesomeDude
Copy link
Contributor

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

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
@Camotoy
Copy link
Member

Camotoy commented Jan 28, 2021

On behalf of RTM, the person who knows Docker best among us developers:

Hmm, honestly it would probs be better just using the ones in the pterodactyl repo, could you link that and suggest he uses that instead? If he has a decent reason to add it then I'll look over it better tomorrow

Said repository: https://github.com/GeyserMC/pterodactyl-stuff/tree/docker-geyser

@rtm516
Copy link
Member

rtm516 commented Jan 28, 2021

I need to look at this better tomorrow but do these images not give you the same if not more functionality. They are designed for pterodactyl panel but should run on any system.

@JamesTheAwesomeDude
Copy link
Contributor Author

JamesTheAwesomeDude commented Jan 28, 2021

I need to look at this better tomorrow but do these images not give you the same if not more functionality. They are designed for pterodactyl panel but should run on any system.

I had not seen those before — though those are just a wrapper around a shell script that fetches CI artifacts at runtime; that Dockerfile:

  • does not store code in the r/o image, doing which is one of the points of Docker
  • does not compile from source during the docker build stage

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.

Copy link
Member

@rtm516 rtm516 left a 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.

standalone.Dockerfile Outdated Show resolved Hide resolved
Copy link

@matsyyy matsyyy left a 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
Copy link

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
Copy link

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"]
Copy link

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
Copy link

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?

@onebeastchris onebeastchris added Waiting On Response When an issue or PR is waiting on a response from a [specific] person. PR: Under Review When a PR (particularly a large one) is currently being reviewed to see if it can be merged labels Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Under Review When a PR (particularly a large one) is currently being reviewed to see if it can be merged Waiting On Response When an issue or PR is waiting on a response from a [specific] person.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants