# Usage:
# 1. docker build -t opencog/minecraft minecraft/
# 2. docker-compose -f minecraft.yml run --rm oc2mc
oc2mc:
extends:
file: common.yml
service: workspace
image: opencog/minecraft:0.1.0
volumes:
- /tmp/.X11-unix/:/tmp/.X11-unix/:ro # For GUI
- $OC2MC_SOURCE_DIR:/oc2mc
links:
- minecraft-server:minecraft
environment:
- MC_SERVER_NAME=minecraft # Should be same as the links field hostname
working_dir: /oc2mc
# For more configuration through environment variables see
# github.com/itzg/dockerfiles/tree/master/minecraft-server#server-configuration
minecraft-server:
image: itzg/minecraft-server
container_name: minecraft-server
ports:
- "25565:25565" # Needed for the client
volumes: # For persistance of configurations
- $PWD/minecraft/data:/data
environment:
- VERSION=1.8.8
- MODE=creative
- EULA=TRUE # This in effect says the user agrees to the Minecraft eula
# TODO How to handle it.
# The follwoing are needed for interacting with the server from terminal
tty: true
stdin_open: true