diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cb2bd28 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM amazoncorretto:17-alpine + +ENV VERSION=7.2_01 +ENV XMX=2G + +WORKDIR /srv/bta + +RUN apk add curl +COPY bta.sh /srv/bta.sh + +RUN cd /srv/bta +EXPOSE 25565/tcp +EXPOSE 25565/udp + +VOLUME /srv/bta +ENTRYPOINT sh /srv/bta.sh \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..f20616d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..88f1b70 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# Better than Adventure! Docker +This is a fairly simple Docker container used to run a Minecraft server with the [Better than Adventure!](https://www.betterthanadventure.net/) modpack. + +Better than Adventure! is an unofficial fork of Minecraft Beta 1.7.3, a version of the game released in 2011. Its goal is to revitalize classic Minecraft with new gameplay features, quality of life improvements, and optimizations! + +## Usage +The user is assumed to have already got a basic Docker instalation up and running. If you haven't, go do that and come back when you're finished. + +#### Basic Usage + +please note that for now fzorb/betterthanadventure is a placeholder +```bash +# Most basic server. Uses default environment variables +$ docker run -p 25565:25565 fzorb/betterthanadventure +# Change the version & maximum amount of ram the server uses: +$ docker run -p 25565:25565 -e XMX=2G -e VERSION=7.1-prerelease-1 fzorb/betterthanadventure +# Mount the server files to a different directory +$ docker run -p 25565:25565 -e XMX=2G -v /srv/bta:/srv/bta fzorb/betterthanadventure +``` +#### Using this container with `docker-compose` +Example `docker-compose.yml` file: +```yml +services: + betterthanadventure: + image: fzorb/betterthanadventure + container_name: btaServer + ports: + - "25565:25565" + environment: + - XMX=2G + - VERSION=7.2_01 + volumes: + - /srv/bta:/srv/bta + restart: unless-stopped +``` + +## Environment Variables +The container has two environment variables: +* **VERSION**: The version of Better than Adventure! you want to run. Defaults to `7.2_01`. You can get the version from [here](https://github.com/Better-than-Adventure/bta-download-repo/releases) (make sure to remove the v in front of the version) +* **XMX**: Maximum ammount of ram the server can use. Defaults to `2G`. + +## Technical +This project does not redistribute in any way, shape or form the Better than Adventure! modpack. The modpack's files are downloaded via the `bta.sh` script. + +**PLEASE NOTE**: This project is not in any way, shape or form affiliated with the Better than Adventure! project. This is an unofficial Docker container. \ No newline at end of file diff --git a/bta.sh b/bta.sh new file mode 100644 index 0000000..3876106 --- /dev/null +++ b/bta.sh @@ -0,0 +1,4 @@ +#!/bin/sh +curl -L "https://github.com/Better-than-Adventure/bta-download-repo/releases/download/v$VERSION/bta-$VERSION-server.jar" -o /srv/bta/server.jar +cd /srv/bta +java -Xmx${XMX} -jar /srv/bta/server.jar