Add Arch Linux dockerfile
This commit is contained in:
parent
df7b0fac4e
commit
2f7b856c6d
2 changed files with 39 additions and 1 deletions
36
Dockerfile.arch
Normal file
36
Dockerfile.arch
Normal file
|
@ -0,0 +1,36 @@
|
|||
#############################
|
||||
## BUILDER ##
|
||||
## Builds rcon-cli for us. ##
|
||||
#############################
|
||||
FROM alpine AS builder
|
||||
|
||||
RUN nice -20 apk update
|
||||
RUN nice -20 apk upgrade
|
||||
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
|
||||
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 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 nice -20 pacman -Syu --noconfirm --needed jre21-openjdk 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 ["bash", "/app/entrypoint.sh"]
|
|
@ -1,6 +1,8 @@
|
|||
services:
|
||||
mcsd:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: mcsd
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 120s
|
||||
|
|
Loading…
Reference in a new issue