diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml deleted file mode 100644 index e48b3fd..0000000 --- a/.gitea/workflows/container.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: Build Multiarch Container Image -on: [push] -jobs: - call-reusable-workflow: - uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main - with: - repository: ${{ gitea.repository }} - ref_name: ${{ gitea.ref_name }} - sha: ${{ gitea.sha }} - registry_url: ${{ secrets.REGISTRY_URL }} - registry_user: ${{ secrets.REGISTRY_USER }} - registry_pw: ${{ secrets.REGISTRY_PW }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2f4691d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +variables: + CONTAINER_NAME: thallian/minecraft + +build: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json + - >- + /kaniko/executor + --context "$CI_PROJECT_DIR" + --dockerfile "$CI_PROJECT_DIR/Dockerfile" + --destination "$CONTAINER_NAME:$CI_COMMIT_SHA" + --destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME" + --destination "$CONTAINER_NAME:latest" diff --git a/Containerfile b/Dockerfile similarity index 69% rename from Containerfile rename to Dockerfile index 858f4f1..da27163 100644 --- a/Containerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ -FROM docker.io/thallian/confd-env:3.19-3.1.6.2 +FROM docker.io/thallian/confd-env:latest RUN addgroup minecraft -g 2222 RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft -ENV VERSION=1.20.4 -ENV SERIAL=462 -ENV SHA256_SUM=70ee8740b9670bfa8a51313bbb99d7527b04526e51baa37fdb1c1ac3e90d8be7 +ENV VERSION=1.19 +ENV SERIAL=43 +ENV SHA256_SUM=05d007a2a3b6933f1e44b0064cbc46358b03e155e0752c22eade84ad21f70b7e RUN wget -O /var/lib/minecraft/paper.jar \ - https://papermc.io/api/v2/projects/paper/versions/$VERSION/builds/$SERIAL/downloads/paper-$VERSION-$SERIAL.jar + https://papermc.io/api/v2/projects/paper/versions/$VERSION/builds/$SERIAL/downloads/paper-$VERSION-$SERIAL.jar RUN echo "$SHA256_SUM /var/lib/minecraft/paper.jar" | sha256sum -c - || exit 1 RUN apk add --no-cache \ - openssl \ - openjdk21-jre-headless + openssl \ + openjdk17-jre-headless ADD /rootfs / diff --git a/README.md b/README.md index 7e2d5a4..ab43466 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -A [Minecraft](https://minecraft.net) server running on -[Paper](https://papermc.io/). +A [Minecraft](https://minecraft.net) server running on [Paper](https://papermc.io/). # Volumes - - `/var/lib/minecraft/plugins` - `/var/lib/minecraft/world` - `/var/lib/minecraft/world_nether` @@ -13,71 +11,55 @@ A [Minecraft](https://minecraft.net) server running on - `/var/lib/minecraft/banned-players.json` # Environment Variables - ## SERVER_NAME - The name of the server. ## MOTD - Message of the day. ## LEVEL_SEED - -[Seed](http://minecraft.gamepedia.com/Seed_(level_generation)) for level -generation. +[Seed](http://minecraft.gamepedia.com/Seed_(level_generation)) for level generation. ## BUKKIT_CONNECTION_THROTTLE - - default: 4000 -The delay before a client is allowed to connect again after a recent connection -attempt in milliseconds. `0` disables the limit. +The delay before a client is allowed to connect again after a recent connection attempt in milliseconds. +`0` disables the limit. ## OP_PERMISSION_LEVEL - - default: 4 One of: - - 1: Ops can bypass spawn protection. -- 2: Ops can use /clear, /difficulty, /effect, /gamemode, /gamerule, /give, and - /tp, and can edit command blocks. +- 2: Ops can use /clear, /difficulty, /effect, /gamemode, /gamerule, /give, and /tp, and can edit command blocks. - 3: Ops can use /ban, /deop, /kick, and /op. - 4: Ops can use /stop. ## ALLOW_NETHER - - default: true Whether players can travel to the Nether. ## ALLOW_FLIGHT - - default: false -Allows users to use flight on your server while in Survival mode, if they have a -mod that provides flight installed. No effect in Creative mode. +Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed. +No effect in Creative mode. ## ANNOUNCE_PLAYER_ACHIEVEMENTS - - default: true Whether there is a server announcment when a player gets an achievement. ## MAX_WORLDSIZE - - default: 29999984 -This sets the maximum possible size in blocks, expressed as a radius, that the -world border can obtain. +This sets the maximum possible size in blocks, expressed as a radius, that the world border can obtain. ## LEVEL_TYPE - - default: DEFAULT One of: - - DEFAULT: Standard world with hills, valleys, water, etc. - FLAT: A flat world with no features, meant for building. - LARGEBIOMES: Same as default but all biomes are larger. @@ -85,132 +67,105 @@ One of: - CUSTOMIZED: Same as default unless generator-settings is set to a preset. ## MAX_BUILD_HEIGHT - - default: 256 -The maximum height in which building is allowed. Terrain may still naturally -generate above a low height limit. +The maximum height in which building is allowed. Terrain may still naturally generate above a low height limit. ## SPAWN_NPCS - - default: true Determines whether villagers will be spawned. ## SPAWN_ANIMALS - - default: true -Determines if [animals](http://minecraft.gamepedia.com/Mob#Passive) will be able -to spawn. +Determines if [animals](http://minecraft.gamepedia.com/Mob#Passive) will be able to spawn. ## SPAWN_MONSTERS - - default: true Determines if monsters will be spawned. ## GENERATE_STRUCTURES - - default: true -Defines whether -[structures](http://minecraft.gamepedia.com/Generated_structures) will be -generated. +Defines whether [structures](http://minecraft.gamepedia.com/Generated_structures) will be generated. ## WHITELIST - - default: false Whether the whitelist is used. ## HARDCORE - - default: false If set to true, players will be set to spectator mode if they die. ## PVP - - default: true Whether PvP is enabled. ## DIFFICULTY - - default: 2 -Defines the [difficulty](http://minecraft.gamepedia.com/Difficulty) of the -server. +Defines the [difficulty](http://minecraft.gamepedia.com/Difficulty) of the server. One of: - - 0: Peaceful - 1: Easy - 2: Normal - 3: Hard ## GAMEMODE - - default: 0 -Defines the -[mode of gameplay](http://minecraft.gamepedia.com/Gameplay#Game_modes). +Defines the [mode of gameplay](http://minecraft.gamepedia.com/Gameplay#Game_modes). One of: - - 0: Survival - 1: Creative - 2: Adventure - 3: Spectator ## ONLINE_MODE - - default: true -Whether to authenticate players with the mojang database. Disable it when -running behind bungeecord. +Whether to authenticate players with the mojang database. Disable it when running behind bungeecord. ## PLAYER_IDLE_TIMEOUT - - default: 0 -If non-zero, players are kicked from the server if they are idle for more than -that many minutes. +If non-zero, players are kicked from the server if they are idle for more than that many minutes. ## MAX_PLAYERS - - default: 20 The maximum number of players that can play on the server at the same time. ## VIEW_DISTANCE - - default: 10 -Sets the amount of world data the server sends the client, measured in chunks in -each direction of the player (radius, not diameter). +Sets the amount of world data the server sends the client, measured in chunks in each direction of the player (radius, not diameter). ## BUNGEECORD - - default: false Whether the server runs behind a bungeecord instance. ## MIN_RAM - -- default: 512M Minimal heapsize for the jvm. +- default: 512M +Minimal heapsize for the jvm. ## MAX_RAM - -- default: 512M Maximal heapsize for the jvm. +- default: 512M +Maximal heapsize for the jvm. # Ports - - 25565 # Capabilities - +- CHOWN - DAC_OVERRIDE - FOWNER - NET_BIND_SERVICE