switch to amazon corretto
All checks were successful
Minecraft Java Image / build-and-push (push) Successful in 18s

This commit is contained in:
2025-11-07 10:02:48 -05:00
parent e038672457
commit 5f0e0b41f7
4 changed files with 19 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
FROM docker.io/bitnami/java:latest
# Read more about Corretto here:
# https://hub.docker.com/_/amazoncorretto
FROM docker.io/amazoncorretto:21
WORKDIR /mc_data
CMD java -Xmx"$MAX_RAM"G -Xms"$MIN_RAM"G -jar ./server.jar nogui
CMD ["sh", "-c" , "java -Xmx${MAX_RAM}G -Xms${MIN_RAM}G -jar ./server.jar nogui"]

View File

@@ -13,7 +13,7 @@ get-server:
@podman run \
-it \
--rm \
-e SERVER_VERSION=1.21.7 \
-e SERVER_VERSION=1.21.10 \
-v $(PWD)/world:/downloads \
--security-opt label=disable \
--userns keep-id \
@@ -22,3 +22,7 @@ get-server:
.PHONY: run
run:
docker compose -f compose.yaml up minecraft
.PHONY: stop
stop:
docker compose -f compose.yaml down

View File

@@ -3,11 +3,17 @@
## Running Locally
```bash
# Build
make build
# download the most recent version of minecraft
make get-server
# Run the server
docker-compose up
make run
# Stop the server
make stop
```
## Uploading to Docker Hub
@@ -30,13 +36,13 @@ helm upgrade --install minecraft
Your minecraft server will be available on port 25565 by default.
## Create a Backup
### Create a Backup in Kubernetes
```bash
kubectl cp <pod_name>:/mc_data <backup>
```
## Restore from Backup
### Restore from Backup in Kubernetes
```bash
kubectl cp <backup> <pod_name>:/mc_data

View File

@@ -1 +1 @@
1.0.2
1.0.3