From d125dd3bdcf25ca2b09d3b240f7d4e212658d4d3 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Thu, 30 May 2024 19:45:38 +0200 Subject: [PATCH] Switch to alpine linux --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index e095277..284e393 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -# Builder container ############################# ## BUILDER ## ## Builds rcon-cli for us. ## ############################# -FROM ghcr.io/archlinux/archlinux:latest AS builder +FROM alpine AS builder -RUN sed "s/SigLevel\ \ \ \ \=\ Required\ DatabaseOptional/SigLevel\ \=\ Optional/g" -i /etc/pacman.conf -RUN nice -20 pacman -Syu --noconfirm go base-devel git +RUN nice -20 apk update +RUN nice -20 apk add go git RUN mkdir /builder /builder/bin RUN git clone --depth=1 https://github.com/gorcon/rcon-cli /builder/rcon-cli WORKDIR /builder/rcon-cli @@ -17,7 +16,7 @@ RUN nice -20 go build -ldflags "-s -w -X main.ServiceVersion=mcsd-builder" -o /b ## This container will be used to ## ## run a Minecraft server. ## #################################### -FROM ghcr.io/archlinux/archlinux:latest AS main +FROM alpine 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 " @@ -26,8 +25,9 @@ LABEL org.opencontainers.image.documentation="https://git.staropensource.de/Jere LABEL org.opencontainers.image.source="https://git.staropensource.de/JeremyStarTM/MCServerDocker" LABEL org.opencontainers.image.licenses="GPL-3.0-only" -RUN sh -c 'sed "s/SigLevel\ \ \ \ \=\ Required\ DatabaseOptional/SigLevel\ \=\ Optional/g" -i /etc/pacman.conf' -RUN nice -20 pacman -Syu --noconfirm jre17-openjdk jre11-openjdk jre8-openjdk +RUN true +RUN nice -20 apk update +RUN nice -20 apk add openjdk21-jre openjdk17-jre openjdk11-jre RUN mkdir /app ADD entrypoint.sh /app/entrypoint.sh COPY --from=builder /builder/bin/rcon /usr/bin/rcon