From fe49f1c654645622a442efb8fc0a4aeaf5bfb39e Mon Sep 17 00:00:00 2001 From: fithwum Date: Sun, 12 Nov 2023 06:52:19 -0800 Subject: [PATCH] main updates added abillity to change port --- fabric/Dockerfile | 6 +----- fabric/install_script.sh | 3 +++ vanilla/Dockerfile | 6 +----- vanilla/install_script.sh | 3 +++ 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/fabric/Dockerfile b/fabric/Dockerfile index 8c8a941..4ea9f04 100644 --- a/fabric/Dockerfile +++ b/fabric/Dockerfile @@ -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" ] \ No newline at end of file diff --git a/fabric/install_script.sh b/fabric/install_script.sh index 0536eb2..489b42f 100644 --- a/fabric/install_script.sh +++ b/fabric/install_script.sh @@ -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. diff --git a/vanilla/Dockerfile b/vanilla/Dockerfile index 3188bbe..7ec21d2 100644 --- a/vanilla/Dockerfile +++ b/vanilla/Dockerfile @@ -2,8 +2,7 @@ FROM fithwum/debian-base:bullseye LABEL maintainer "fithwum" ENV ACCEPT_EULA="" -ENV GAME_PORT_TCP="" -ENV GAME_PORT_UDP="" +ENV GAME_PORT="" ENV MC_VERSION="" # URL's for files @@ -27,8 +26,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" ] \ No newline at end of file diff --git a/vanilla/install_script.sh b/vanilla/install_script.sh index 1ea1953..61dfde7 100644 --- a/vanilla/install_script.sh +++ b/vanilla/install_script.sh @@ -85,6 +85,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.