A base image to setup a Minecraft Server (with Forge).
docker run -i \
-p 25565:25565 \
-v /path/to/data:/data \
-e 'EULA=TRUE' \
craftcloud/forge:1.7.10Options:
-p PORT:25565- Forward port25565(which the game server listens on) to your host'sPORT-v PATH_TO_DATA:/data- MountPATH_TO_DATAon your host to/datain the container, which the game data (saves, configs) would be saved in-e 'EULA=TRUE'To tell you're accepting the Minecraft EULA
FROM craftcloud/forge:1.7.10
ENV EULA TRUE
# Use your custom server.properties
COPY server.properties /server.properties
# Add /mods of your repo into the image
COPY mods /mods
# or download a modpack
# ENV MODPACK "http://....."
# Download a world save
# ENV WORLD "http://...."Remember to mount /data to a storage volume to persistent your saves!