MCServerDocker/Dockerfile
JeremyStarTM 0c7ea1f566
Disable pgp checking (hopefully this works)
I've noticed that sometimes the verification does not pass during certain situations. Don't know why. And because it's only running a Minecraft server and not a database, imma disable that verification. We can trust the Arch Linux Leader & TUs (hopefully).
2024-05-30 19:12:21 +02:00

37 lines
1.8 KiB
Docker

# Builder container
#############################
## BUILDER ##
## Builds rcon-cli for us. ##
#############################
FROM ghcr.io/archlinux/archlinux:latest AS builder
RUN sed "s/SigLevel\ \ \ \ \=\ Required\ DatabaseOptional/SigLevel\ \=\ Optional/g" -i pacman.conf
RUN nice -20 pacman -Syu --noconfirm go base-devel git
RUN mkdir /builder /builder/bin
RUN git clone --depth=1 https://github.com/gorcon/rcon-cli /builder/rcon-cli
WORKDIR /builder/rcon-cli
RUN nice -20 go build -ldflags "-s -w -X main.ServiceVersion=mcsd-builder" -o /builder/bin/rcon ./cmd/gorcon/main.go
####################################
## MAIN ##
## This container will be used to ##
## run a Minecraft server. ##
####################################
FROM ghcr.io/archlinux/archlinux:latest AS main
LABEL org.opencontainers.image.title="MCServerDocker"
LABEL org.opencontainers.image.description="Runs a Minecraft Server inside a Docker container."
LABEL org.opencontainers.image.authors="JeremyStarTM <jeremystartm@staropensource.de>"
LABEL org.opencontainers.image.url="https://git.staropensource.de/JeremyStarTM/MCServerDocker"
LABEL org.opencontainers.image.documentation="https://git.staropensource.de/JeremyStarTM/MCServerDocker/src/branch/develop/README.md"
LABEL org.opencontainers.image.source="https://git.staropensource.de/JeremyStarTM/MCServerDocker"
LABEL org.opencontainers.image.licenses="GPL-3.0-only"
RUN sed "s/SigLevel\ \ \ \ \=\ Required\ DatabaseOptional/SigLevel\ \=\ Optional/g" -i pacman.conf
RUN nice -20 pacman -Syu --noconfirm jre17-openjdk jre11-openjdk jre8-openjdk
RUN mkdir /app
ADD entrypoint.sh /app/entrypoint.sh
COPY --from=builder /builder/bin/rcon /usr/bin/rcon
STOPSIGNAL SIGTERM
EXPOSE 25565 25565/tcp
ENTRYPOINT ["/sbin/bash", "/app/entrypoint.sh"]