Refactor image, Java sourcing, and add entrypoint

- Moved to debian-slim base image to minimize size
- Transitioned to Adoptium APT repos for flexibility in Java versions
- Added an entrypoint script that configures EULA and server settings
- Run server in resumable screen for console access in the container
This commit is contained in:
2024-05-12 02:59:45 -04:00
parent 0c19cc1913
commit 381bd9eeff
5 changed files with 162 additions and 28 deletions

View File

@@ -1,12 +1,17 @@
# Minecraft Docker Image
This Dockerfile sets up a Minecraft server based on the `debian-slim` image.
This Dockerfile sets up a Minecraft server based on Debian stable. WIP.
To test image creation, run:
By running the following and building this image, you are agreeing to
[Minecraft's EULA](https://www.minecraft.net/en-us/eula):
```
docker build --build-arg EULA=true -t minecraft . && \
docker run -d --name minecraft --rm minecraft && \
docker logs -f minecraft
echo "EULA=true" > .env
```
To build and test the image:
```
docker compose build
docker compose up -d
docker logs -f minecraft-minecraft-1
```
## Copyright and License