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 # Environment Variables
ENV ACCEPT_EULA="" ENV ACCEPT_EULA=""
ENV GAME_PORT_TCP="" ENV GAME_PORT=""
ENV GAME_PORT_UDP=""
ENV MC_VERSION="" ENV MC_VERSION=""
ENV FABRIC_VERSION="" ENV FABRIC_VERSION=""
ENV INSTALLER_VERSION="" ENV INSTALLER_VERSION=""
@@ -30,8 +29,5 @@ RUN chmod +x /MCtemp/install_script.sh
# Directory where data is stored # Directory where data is stored
VOLUME /MCserver VOLUME /MCserver
# 25565 Default.
EXPOSE 25565/udp 25565/tcp
# Run command # Run command
CMD [ "/bin/bash", "./MCtemp/install_script.sh" ] CMD [ "/bin/bash", "./MCtemp/install_script.sh" ]

View File

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

View File

@@ -2,8 +2,7 @@ FROM fithwum/debian-base:bullseye
LABEL maintainer "fithwum" LABEL maintainer "fithwum"
ENV ACCEPT_EULA="" ENV ACCEPT_EULA=""
ENV GAME_PORT_TCP="" ENV GAME_PORT=""
ENV GAME_PORT_UDP=""
ENV MC_VERSION="" ENV MC_VERSION=""
# URL's for files # URL's for files
@@ -27,8 +26,5 @@ RUN chmod +x /MCtemp/install_script.sh
# Directory where data is stored # Directory where data is stored
VOLUME /MCserver VOLUME /MCserver
# 25565 Default.
EXPOSE 25565/udp 25565/tcp
# Run command # Run command
CMD [ "/bin/bash", "./MCtemp/install_script.sh" ] CMD [ "/bin/bash", "./MCtemp/install_script.sh" ]

View File

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