diff --git a/README.md b/README.md index b6e966c..53a36df 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,28 @@ -# Playit Docker Images +

Playit Docker Images 🐳

-Contains docker images for popular game servers integraded with playit to make them public. +Contains docker images for popular game servers integrated with playit to make them public.\ +playit.gg is a global proxy that allows you to host a server without port forwarding. [Read more](https://playit.gg/about) + +Playit.gg +
+ +## We provide +- TCP and UDP tunneling +- Dual stacked IPv4 and IPv6 network +- Continuous port ranges +- Static IPs and ports +**All for free!** + *extra premium features* to support the project :) + +## Supported Games ✅ +- [satisfactory](/satisfactory/README.md) +- [scp-secret-laboratory](/scp-secret-laboratory/README.md) +- [unturned](/unturned/README.md) +- [valheim](/valheim/README.md) + +## Coming-Soon™ +- Minecraft Java +- Minecraft Bedrock +- Minecraft BungeeCord +- Rust + +Want More? Have Any Suugisons? [Join Our Discord](https://discord.gg/AXAbujx) \ No newline at end of file diff --git a/docs/playit-gg-docker.png b/docs/playit-gg-docker.png new file mode 100644 index 0000000..dc2de93 Binary files /dev/null and b/docs/playit-gg-docker.png differ diff --git a/fivem/Dockerfile b/fivem/Dockerfile new file mode 100644 index 0000000..e882669 --- /dev/null +++ b/fivem/Dockerfile @@ -0,0 +1,19 @@ +# Use the spritsail/fivem image as the base for the new image +FROM spritsail/fivem + +# Install the dependencies for the playit-cli tool +RUN apt-get update && apt-get install -y \ + tar curl gcc g++ lib32gcc1 libgcc1 libcurl4-gnutls-dev:i386 \ + libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 \ + lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 \ + iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat \ + tzdata jq wget unzip + +# Download the latest version of the playit-cli tool +ENV PLAYIT_DL="https://github.com/playit-cloud/playit-agent/releases/latest" +RUN curl -o playit-cli -L "$PLAYIT_DL" +RUN chmod +x playit-cli + +# Add a script to start the FiveM server using the playit-cli tool +COPY start-fivem-server.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/start-fivem-server.sh diff --git a/fivem/start-fivem-server.sh b/fivem/start-fivem-server.sh new file mode 100644 index 0000000..c25e400 --- /dev/null +++ b/fivem/start-fivem-server.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Source the playit.env file +source playit.env || true + +# Print the IP and port of the tunnel +echo "IP: ${TUNNEL_0_HOSTNAME}" +echo "Port: ${TUNNEL_0_PORT}" + +# Wait for 4 seconds before starting the server +echo "starting in 4 seconds" +sleep 4; + +# Start a loop that prints the tunnel address every 10 seconds +bash -c "while true; do sleep 10; echo addr = ${TUNNEL_0_HOSTNAME}:${TUNNEL_0_PORT}; done;" & + +# Set the HOME environment variable to the /mnt/server directory +# and switch to that directory +export HOME=/mnt/server +cd $HOME + +# Use the playit-cli tool to start the FiveM server +./playit-cli --start-server diff --git a/minecraft-bedrock/Dockerfile b/minecraft-bedrock/Dockerfile new file mode 100644 index 0000000..1f90bc3 --- /dev/null +++ b/minecraft-bedrock/Dockerfile @@ -0,0 +1,19 @@ +# Use the itzg/minecraft-bedrock-server image as the base for the new image +FROM itzg/minecraft-bedrock-server + +# Install the dependencies for the playit-cli tool +RUN apt-get update && apt-get install -y \ + tar curl gcc g++ lib32gcc1 libgcc1 libcurl4-gnutls-dev:i386 \ + libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 \ + lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 \ + iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat \ + tzdata jq wget unzip + +# Download the latest version of the playit-cli tool +ENV PLAYIT_DL="https://github.com/playit-cloud/playit-agent/releases/latest" +RUN curl -o playit-cli -L "$PLAYIT_DL" +RUN chmod +x playit-cli + +# Add a script to start the Minecraft Bedrock server using the playit-cli tool +COPY start-bedrock-server.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/start-bedrock-server.sh diff --git a/minecraft-bedrock/start-bedrock-server.sh b/minecraft-bedrock/start-bedrock-server.sh new file mode 100644 index 0000000..4d4b767 --- /dev/null +++ b/minecraft-bedrock/start-bedrock-server.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Source the playit.env file +source playit.env || true + +# Print the IP and port of the tunnel +echo "IP: ${TUNNEL_0_HOSTNAME}" +echo "Port: ${TUNNEL_0_PORT}" + +# Wait for 4 seconds before starting the server +echo "starting in 4 seconds" +sleep 4; + +# Start a loop that prints the tunnel address every 10 seconds +bash -c "while true; do sleep 10; echo addr = ${TUNNEL_0_HOSTNAME}:${TUNNEL_0_PORT}; done;" & + +# Set the HOME environment variable to the /mnt/server directory +# and switch to that directory +export HOME=/mnt/server +cd $HOME + +# Use the playit-cli tool to start the Minecraft Bedrock server +./playit-cli --start-server diff --git a/minecraft-bungeecord/Dockerfile b/minecraft-bungeecord/Dockerfile new file mode 100644 index 0000000..8015943 --- /dev/null +++ b/minecraft-bungeecord/Dockerfile @@ -0,0 +1,19 @@ +# Use the itzg/docker-bungeecord image as the base for the new image +FROM itzg/docker-bungeecord + +# Install the dependencies for the playit-cli tool +RUN apt-get update && apt-get install -y \ + tar curl gcc g++ lib32gcc1 libgcc1 libcurl4-gnutls-dev:i386 \ + libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 \ + lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 \ + iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat \ + tzdata jq wget unzip + +# Download the latest version of the playit-cli tool +ENV PLAYIT_DL="https://github.com/playit-cloud/playit-agent/releases/latest" +RUN curl -o playit-cli -L "$PLAYIT_DL" +RUN chmod +x playit-cli + +# Add a script to start the Bungeecord server using the playit-cli tool +COPY start-bungeecord-server.sh /usr/local/bin/ +RUN chmod +x / diff --git a/minecraft-bungeecord/start-bungeecord-server.sh b/minecraft-bungeecord/start-bungeecord-server.sh new file mode 100644 index 0000000..fc0cb3b --- /dev/null +++ b/minecraft-bungeecord/start-bungeecord-server.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Source the playit.env file +source playit.env || true + +# Print the IP and port of the tunnel +echo "IP: ${TUNNEL_0_HOSTNAME}" +echo "Port: ${TUNNEL_0_PORT}" + +# Wait for 4 seconds before starting the server +echo "starting in 4 seconds" +sleep 4; + +# Start a loop that prints the tunnel address every 10 seconds +bash -c "while true; do sleep 10; echo addr = ${TUNNEL_0_HOSTNAME}:${TUNNEL_0_PORT}; done;" & + +# Set the HOME environment variable to the /mnt/server directory +# and switch to that directory +export HOME=/mnt/server +cd $HOME + +# Use the playit-cli tool to start the Bungeecord server +./playit-cli --start-server diff --git a/minecraft-java/Dockerfile b/minecraft-java/Dockerfile new file mode 100644 index 0000000..57ed90d --- /dev/null +++ b/minecraft-java/Dockerfile @@ -0,0 +1,22 @@ +# Use the itzg/minecraft-server image as the base for the new image +FROM itzg/minecraft-server + +# Install the dependencies for the playit-cli tool +RUN apt-get update && apt-get install -y \ + tar curl gcc g++ lib32gcc1 libgcc1 libcurl4-gnutls-dev:i386 \ + libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 \ + lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 \ + iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat \ + tzdata jq wget unzip + +# Download the latest version of the playit-cli tool +ENV PLAYIT_DL="https://github.com/playit-cloud/playit-agent/releases/latest" +RUN curl -o playit-cli -L "$PLAYIT_DL" +RUN chmod +x playit-cli + +# Add a script to start the Minecraft server using the playit-cli tool +COPY start-minecraft-server.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/start-minecraft-server.sh + +# Set the entrypoint to the start-minecraft-server.sh script +ENTRYPOINT ["/usr/local/bin/start-minecraft-server.sh"] diff --git a/minecraft-java/README.md b/minecraft-java/README.md new file mode 100644 index 0000000..9f226c1 --- /dev/null +++ b/minecraft-java/README.md @@ -0,0 +1,46 @@ +# Minecraft Java Server Docker Image + +This directory contains a Dockerfile for building a Docker image that can be used to run a **Minecraft Java** server using the [`itzg/minecraft-server`](https://hub.docker.com/r/itzg/minecraft-server) image and the `playit-cli` tool.\ +The image includes all the necessary dependencies and the `playit-cli` tool. + +## Preparation + +To use this Dockerfile, you need to have the following installed on your system: + +Docker: This is required to build and run the Docker image. You can install Docker on your system by following the instructions on the [Docker website](https://docs.docker.com/get-docker/). + +### Building the Docker Image + +To build the Docker image, follow these steps: +1. Download the latest [Release](https://github.com/playit-cloud/docker-games/releases/latest) +2. Change to the directory containing the Dockerfile: +```cd +cd minecraft-java +``` +3. Build the Docker image: +``` +docker build -t minecraft-java . +``` +This will create a Docker image named `minecraft-java` that contains all the dependencies and the `playit-cli` tool needed to run a Minecraft Java server using the `itzg/minecraft-server` image. + +### Running the Minecraft Server +To run the Minecraft server, use the following command: + +```docker +docker run -d -p 25565:25565 --name mc minecraft-server +``` +This will start a new Docker container named `mc` using the `minecraft-java` image and start the Minecraft server using the `playit-cli` tool. + +To stop the Minecraft server and the Docker container, use the following command: +```docker +docker stop mc +``` +This will stop the Docker container and the Minecraft server. + +> **Warning**\ +> Please note that the exact command to start the Minecraft server using playit-cli may vary depending on the version of the tool and the options you want to use. You can use the `playit-cli --help` command to see the available options and usage instructions. + +## Conclusion + +In this guide, we showed how to use the Dockerfile in this repository to build a Docker image for a Minecraft Java server using the `itzg/minecraft-server` image and the `playit-cli` tool, and how to use the image to run and stop the Minecraft server.\ +The `playit-cli` tool makes it easy to manage the Minecraft server inside the Docker container. \ No newline at end of file diff --git a/minecraft-java/start-minecraft-server.sh b/minecraft-java/start-minecraft-server.sh new file mode 100644 index 0000000..d5b3f98 --- /dev/null +++ b/minecraft-java/start-minecraft-server.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Source the playit.env file +source playit.env || true + +# Print the IP and port of the tunnel +echo "IP: ${TUNNEL_0_HOSTNAME}" +echo "Port: ${TUNNEL_0_PORT}" + +# Wait for 4 seconds before starting the server +echo "starting in 4 seconds" +sleep 4; + +# Start a loop that prints the tunnel address every 10 seconds +bash -c "while true; do sleep 10; echo addr = ${TUNNEL_0_HOSTNAME}:${TUNNEL_0_PORT}; done;" & + +# Set the HOME environment variable to the /mnt/server directory +# and switch to that directory +export HOME=/mnt/server +cd $HOME + +# Use the playit-cli tool to start the Minecraft server +./playit-cli --start-server \ No newline at end of file