added forge

This commit is contained in:
fithwum
2023-03-21 06:28:43 -07:00
parent 968ea3ee5d
commit 31c3b31395
6 changed files with 165 additions and 12 deletions

View File

@@ -0,0 +1,32 @@
FROM fithwum/debian-base:bullseye
LABEL maintainer "fithwum"
ENV ACCEPT_EULA="false"
ENV GAME_PORT=25565
# URL's for files
ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-1.19.3/files/Install_Script.sh
# Install java-17 & Dependencies.
RUN apt-get -y update \
&& apt-get -y --fix-broken install \
&& apt-get install -y software-properties-common openjdk-17-jdk \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates -f;
# Folder creation.
RUN mkdir -p /MCserver /MCtemp \
&& chmod 777 -R /MCserver /MCtemp \
&& chown 99:100 -R /MCserver /MCtemp
ADD "${INSTALL_SCRIPT}" /MCtemp
RUN chmod +x /MCtemp/Install_Script.sh
# Directory where data is stored
VOLUME /MCserver
# 25565 Default.
EXPOSE 25565/udp 25565/tcp
# Run command
CMD [ "/bin/bash", "./MCtemp/Install_Script.sh" ]