I am trying to build a Dockerfile to run the game server but when I run the server it closes, can you help me how do I solve it? thank you.
# Use an official mono runtime image
FROM mono:6.8
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install additional dependencies or libraries required for your server (if any)
RUN apt-get update && \
apt-get install -y \
glib2.0-dev \
libpng-dev \
libjpeg-dev \
libgif-dev \
libtiff-dev \
libexif-dev \
libx11-dev \
libfontconfig1-dev \
gettext \
make \
g++ \
&& apt-get clean
# Install miniupnpc to enable UPnP support
RUN apt-get install -y miniupnpc
# Expose the necessary ports for your Intersect Engine server
EXPOSE 5400/udp
# Define environment variables (if needed)
ENV SERVER_PORT=5400
ENV OTHER_ENV_VARIABLE=value
# Set the command to run your Intersect Engine server
CMD ["mono", "Intersect Server.exe"]
//////////////////////////////////////////////////////
docker run --cpus=2 -m 2g -p 5400:5400/udp intersect-server
_____ _ _
|_ _| | | | |
| | _ __ | |_ ___ _ __ ___ ___ ___| |_
| | | '_ \| __/ _ \ '__/ __|/ _ \/ __| __|
_| |_| | | | || __/ | \__ \ __/ (__| |_
|_____|_| |_|\__\___|_| |___/\___|\___|\__|
free 2d orpg engine
Copyright (C) 2020 Ascension Game Dev
Version 0.7.2.64
For help, support, and updates visit: https://www.ascensiongamedev.com
Loading, please wait.
Server has 1 registered players.
Game time is now: Saturday, October 7, 2023 12:33:40 AM
Server Started. Using UDP Port #5400
Connection Information:
Public IP: 186.154.0.255
Public Port: 5400
Type exit to shutdown the server, or help for a list of commands.
>
Server is now closing. Please wait while your game and player data is saved!
Main server shutdown completed. If your server is stuck you may safely kill it.