first commit
All checks were successful
Lint, Build, Scan and Publish Docker Image / build-and-push (push) Successful in 1m4s
All checks were successful
Lint, Build, Scan and Publish Docker Image / build-and-push (push) Successful in 1m4s
This commit is contained in:
42
.gitea/workflows/publish-docker.yml
Normal file
42
.gitea/workflows/publish-docker.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
name: Lint, Build, Scan and Publish Docker Image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.br0tkasten.de
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: registry.br0tkasten.de/${{ gitea.repository }}
|
||||
flavor: |
|
||||
latest=true
|
||||
tags: |
|
||||
type=sha,format=short
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
provenance: false
|
||||
push-args: --provenance=false
|
||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM marctv/minecraft-papermc-server
|
||||
|
||||
ADD https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot /opt/minecraft/plugins/Geyser.jar
|
||||
ADD https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot /opt/minecraft/plugins/Floodgate.jar
|
||||
|
||||
RUN chown -R 1001:1001 /opt/minecraft
|
||||
|
||||
USER 1001
|
||||
|
||||
EXPOSE 25565/tcp 25565/udp 19132/udp
|
||||
|
||||
ENTRYPOINT ["/opt/minecraft/docker-entrypoint.sh"]
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=3m CMD nc -z 127.0.0.1 25565 || exit 1
|
||||
19
docker-compose.yml
Normal file
19
docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
version: "3"
|
||||
services:
|
||||
minecraft:
|
||||
image: marctv/minecraft-papermc-server:latest
|
||||
restart: always
|
||||
container_name: "mcserver"
|
||||
environment:
|
||||
MEMORYSIZE: "1G"
|
||||
PAPERMC_FLAGS: ""
|
||||
volumes:
|
||||
- minecraftserver:/data
|
||||
ports:
|
||||
- "12000:25565/tcp"
|
||||
- "12000:25565/udp"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
minecraftserver:
|
||||
Reference in New Issue
Block a user