initial commit

This commit is contained in:
Alexandru 2024-08-15 18:41:08 +03:00
parent 47eefb7928
commit 3f2e4ab42c
4 changed files with 78 additions and 0 deletions

16
Dockerfile Normal file
View File

@ -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

13
LICENSE.md Normal file
View File

@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
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.

45
README.md Normal file
View File

@ -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.

4
bta.sh Normal file
View File

@ -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