main updates added abillity to change port

This commit is contained in:
2023-11-12 06:52:19 -08:00
parent eeb018cfc0
commit fe49f1c654
4 changed files with 8 additions and 10 deletions

View File

@@ -3,8 +3,7 @@ LABEL maintainer "fithwum"
# Environment Variables
ENV ACCEPT_EULA=""
ENV GAME_PORT_TCP=""
ENV GAME_PORT_UDP=""
ENV GAME_PORT=""
ENV MC_VERSION=""
ENV FABRIC_VERSION=""
ENV INSTALLER_VERSION=""
@@ -30,8 +29,5 @@ 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" ]

View File

@@ -82,6 +82,9 @@ else
echo "WARNING ! Something went wrong, please check EULA variable"
fi
sleep 1
echo "INFO ! Setting game port."
sed -i '/server-port='*'/c\server-port='$GAME_PORT'' /MCserver/server.properties
sleep 1
# Set permissions.