Skip to content

Instantly share code, notes, and snippets.

@renevo
Created November 29, 2017 09:24
Show Gist options
  • Save renevo/ea192ab29c39b5953c76d212aaa07796 to your computer and use it in GitHub Desktop.
Save renevo/ea192ab29c39b5953c76d212aaa07796 to your computer and use it in GitHub Desktop.
Run minecraft in docker
#! /bin/bash
docker service create \
--name aoe \
--publish 25565:25565 \
--env EULA=true \
--env MEMORY=4G \
--mount type=bind,source=/home/minecraft/aoe/world,destination=/home/minecraft/world \
--mount type=bind,source=/home/minecraft/aoe/backups,destination=/home/minecraft/backups \
--mount type=bind,source=/home/minecraft/aoe/server.properties,destination=/home/minecraft/server.properties \
--mount type=bind,source=/home/minecraft/aoe/ops.json,destination=/home/minecraft/ops.json \
--mount type=bind,source=/home/minecraft/aoe/whitelist.json,destination=/home/minecraft/whitelist.json \
--mount type=bind,source=/home/minecraft/aoe/banned-players.json,destination=/home/minecraft/banned-players.json \
--mount type=bind,source=/home/minecraft/aoe/banned-ips.json,destination=/home/minecraft/banned-ips.json \
mc-age-of-engineering:latest
#! /bin/bash
docker build \
--build-arg CURSE_PROJECT=age-of-engineering \
--build-arg CURSE_PROJECT_VERSION=latest \
-t mc-age-of-engineering:latest .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment