added minecraft and factorio

This commit is contained in:
ACoolName 2023-12-26 19:39:19 +02:00
parent a79619b74d
commit 5f19ad5c36
3 changed files with 24 additions and 0 deletions

10
factorio/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine
ARG VERSION
RUN mkdir -p /opt/factorio
WORKDIR /opt/factorio
RUN apk add jq curl wget
RUN cd /opt && \
wget -O /opt/server.tar.xz https://www.factorio.com/get-download/1.1.100/headless/linux64 && \
tar -xf /opt/server.tar.xz && \
rm /opt/server.tar.xz
ENTRYPOINT [ "executable" ]

7
factorio/create.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/zsh
if [[ -z $VERSION ]] ;
then VERSION=$(\
curl https://factorio.com/api/latest-releases | \
jq -r .stable.headless\
);
fi;

View File

@ -0,0 +1,7 @@
#!/bin/zsh
if [[ -z $VERSION ]] ;
then
VERSION=$(curl https://api.papermc.io/v2/projects/paper | \
jq -r .versions[-1]);
fi;
docker build -t minecraft:paper-${VERSION} . --arg VERSION=${VERSION}