Last active
September 7, 2018 23:49
-
-
Save lucymhdavies/ea043c74f20a9bcd3e7127b231fd1b26 to your computer and use it in GitHub Desktop.
Mapcrafter in Docker, based on https://github.com/mapcrafter/mapcrafter/issues/278#issuecomment-416714539
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
cd /git/mapcrafter | |
mkdir build | |
cd build | |
cmake .. | |
make; make | |
make; make install | |
ldconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
MAINTAINER muebau | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV HOME / | |
VOLUME ["/config"] | |
VOLUME ["/output"] | |
VOLUME ["/world"] | |
RUN apt-get update && \ | |
apt-get -y install git cmake build-essential libpng-dev libjpeg-dev libboost-iostreams-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev wget python imagemagick && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
RUN mkdir /git && cd /git && \ | |
rm -rf /git/* && \ | |
git clone -b world113 https://github.com/mapcrafter/mapcrafter.git | |
RUN ls /git | |
# Textures | |
RUN cd /git/mapcrafter && \ | |
wget https://launcher.mojang.com/v1/objects/8de235e5ec3a7fce168056ea395d21cbdec18d7c/client.jar && \ | |
./src/tools/mapcrafter_textures.py client.jar src/data/textures/ | |
ADD build.sh /build.sh | |
RUN chmod 0777 /build.sh | |
ADD render.sh /render | |
RUN chmod 0777 /render | |
RUN /build.sh | |
ADD render.conf /render.conf | |
CMD /render; cat /output/mapcrafter.log | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output_dir = /output | |
[global:map] | |
world = myworld | |
render_view = isometric | |
render_mode = daylight | |
# Entire Overworld | |
[world:myworld] | |
input_dir = /world | |
default_view = 1268, 221, 84 | |
default_zoom = 3 | |
[map:world_isometric_day] | |
name = Overworld | |
rotations = top-left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -f /config/render.conf ]; then | |
cp /render.conf /config/render.conf | |
fi | |
mapcrafter -c /config/render.conf -j 2 >> /output/mapcrafter.log 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment