-
-
Notifications
You must be signed in to change notification settings - Fork 15
Add dockerfile and example docker-compose for building and running TMO #68
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
base: main
Are you sure you want to change the base?
Conversation
|
This builds for me. @artur9010 Would you please bring this branch up to date with the origin's main? |
|
any updates on this? i'd love to pull the image from an official source instead of building it manually on my end |
stwalkerster
left a comment
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.
Firstly, sorry for the extreme length of time this has been sitting for review. I've had multiple thoughts on this several times, but never quite got to the point of articulating them into a review.
I like the idea of providing alternative packaging methods, but I'm not a massive fan of the implementation here.
We should either
- a) treat this as purely an example, in which case it might be better not as files in the repository but extensions to the documentation on how to build the container and set it up with docker-compose (or other orchestration tools; a k8s cronjob might be awesome to see here but I expect the number of people who might use that to be counted on one hand); or
- b) we provide files that are well-documented and work with minimal modifications for 90%+ of people.
| # Copy required c headers | ||
| RUN curl -o Imaging.h https://raw.githubusercontent.com/python-pillow/Pillow/10.2.0/src/libImaging/Imaging.h | ||
| RUN curl -o ImagingUtils.h https://raw.githubusercontent.com/python-pillow/Pillow/10.2.0/src/libImaging/ImagingUtils.h | ||
| RUN curl -o ImPlatform.h https://raw.githubusercontent.com/python-pillow/Pillow/10.2.0/src/libImaging/ImPlatform.h |
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.
We're targeting 10.3.0 at the moment; it would be nice if this can be done in such a way that we don't have to remember multiple places to update the version numbers?
| @@ -0,0 +1,39 @@ | |||
| # Example docker-compose for running The-Minecraft-Overviewer | |||
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.
If this is an example only and won't run for most users without changes, please don't call it docker-compose.yml; perhaps docker-compose.example.yml?
| # Example docker-compose for running The-Minecraft-Overviewer | ||
| # Make sure to read it and modify to meet your needs. | ||
|
|
||
| version: "3.8" |
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.
IIRC version is now deprecated
| mkdir -p /mnt/minecraft/.minecraft/versions/1.20.4 && | ||
| chown 1000:1000 -R /usr/overviewer/output && | ||
| wget https://piston-data.mojang.com/v1/objects/fd19469fed4a4b4c15b2d5133985f0e3e7816a8a/client.jar -O /mnt/minecraft/.minecraft/versions/1.20.4/1.20.4.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.
Reasonable minds can differ on this one.
I've never been a massive fan of backporting a kubernetes style init container into a docker-compose architecture; there isn't a sensible way of enforcing ordering or the mere fact that an init container should run to completion before the main container starts.
I'm not sure if I prefer an approach of just bundling this into an entrypoint script in the main container, or if there should be an expectation for the user to grab the jar manually and bind-mount it in. Perhaps both options are reasonable here?
That said, if it's done automatically, we ought to be parameterising the client version and locating the correct URL automatically, rather than relying on this magic value in the URL.
| # Make a copy of sample_config.py and rename it to config.py. Make sure to modify paths inside of it. | ||
| volumes: | ||
| - overviewer-output:/usr/overviewer/output:rw | ||
| - /home/minecraft/minecraft:/usr/overviewer/server:ro |
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.
This should probably have explanation for others that this is where the world data is expected to reside, and that it will need to be changed?
Adds dockerfile to make running tmo easier and faster, it also works on arm64 machines.
I added a basic docker-compose that also downloads 1.20.4 jar to make it easier to setup.
It also removes old and unused .gitlab-ci.yaml.