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

working dockerfile for mcmap #89

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

Conversation

deltreey
Copy link

I wanted to deploy this separate to my minecraft instance so that the load of building the map didn't interfere with my game. I'm going to do that with a docker container, so I needed mcmap available in that form. I built this for myself, but it could be useful to others, so here you go.

I am not the best with Dockerfiles, so there may be better ways to do some of the steps I did here, but as it sits, it does work and it does output an image -- tested on a 3GB world folder.

Things I would like to improve in the future:

  1. I would like to output the map to a stream or something instead of a file, but I'm not familiar enough with the code to change that. This would remove the need for the second volume -- the output folder.
  2. I would have preferred to use the gcc docker image as a base, but I can't find a package for debian for qt_sinks.h (it exists in libspdlog-dev on ubuntu but not on debian for some reason)

Building the docker image:

docker build -t mcmap:latest .

Running the docker container:

docker run --rm -v <world-folder>:/input -v <output-folder>:/output mcmap:latest

Copy link
Owner

@spoutn1k spoutn1k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great ! I noticed a few things that might make the whole process easier though.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@spoutn1k
Copy link
Owner

Also, using a stream might be doable by implementing a canvas type, but I am not sure if the sequential writes are supported. If not, one could write to a temporary image and then cat it on a target stream.

@deltreey
Copy link
Author

alright, build target specification definitely cleaned things up a lot. I tried to figure out a smart way to cat the data to stdout, but i couldn't figure it out. Anything I do modifies the docker command so much that it becomes inflexible for using other features (like outputing other dimensions. If you have other ideas i'm all ears, but here is the improved version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants