├── LICENSE ├── README.md ├── auto-export ├── docker-compose.yaml └── dockerfile └── manual-export ├── docker-compose.yaml └── dockerfile /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 GodotNuts 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GodotServer-Docker 2 | 3 | A repo with everything needed to spin up a Godot Server in Docker using Alpine Linux 4 | 5 | ## :speech_balloon: Discord 6 | 7 | https://discord.gg/xXKYN2ZxDB 8 | 9 | ## :coffee: Contributors 10 | 11 | - [Chuck Lindblom](https://github.com/BearDooks) (Creator) 12 | 13 | 14 | ## :arrow_down: Cloning 15 | SSH: 16 | ```bash 17 | git clone git@github.com:GodotNuts/GodotServer-Docker.git 18 | ``` 19 | 20 | HTTPS: 21 | ``` 22 | git clone https://github.com/GodotNuts/GodotServer-Docker.git 23 | ``` 24 | 25 | ## :question: How to Use 26 | 27 | Check out the [wiki :notebook:](https://github.com/GodotNuts/GodotServer-Docker/wiki) for the new updated instructions! 28 | 29 | ## :bug: Reporting an Issue 30 | 31 | Please make sure to open a bug report if you have any questions. The more detail in there the better 32 | 33 | ## :computer: Making Contributions 34 | 35 | Contributions are always welcome. Please feel free to fork this repo and request changes 36 | 37 | ## :memo: License 38 | 39 | This plugin falls under the [MIT License](https://github.com/GodotNuts/GodotServer-Docker/blob/main/LICENSE) 40 | 41 | ## :star2: BIG THANKS 42 | 43 | A HUGE thank you to the following people for helping me test and get this working (In no particular order) 44 | 45 | * [Kyle Szklenski](https://github.com/WolfgangSenff) 46 | * MatthewH 47 | * Heartbeast's Discord server 48 | * YOU - The person using this repo! -------------------------------------------------------------------------------- /auto-export/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | godot: 5 | build: . 6 | ports: 7 | - "12345:12345" 8 | - "12345:12345/udp" 9 | tty: true 10 | container_name: godot-server -------------------------------------------------------------------------------- /auto-export/dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | 3 | # Environment Variables 4 | ENV GODOT_VERSION "3.2.3" 5 | ENV GODOT_EXPORT_PRESET="Linux/X11" 6 | ENV GODOT_GAME_NAME "" 7 | ENV HTTPS_GIT_REPO "" 8 | 9 | # Updates and installs to the server 10 | RUN apk update 11 | RUN apk add --no-cache bash 12 | RUN apk add --no-cache wget 13 | RUN apk add --no-cache git 14 | 15 | # Allow this to run Godot 16 | RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk 17 | RUN apk add --allow-untrusted glibc-2.31-r0.apk 18 | 19 | # Download Godot and export template, version is set from variables 20 | RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \ 21 | && wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_export_templates.tpz \ 22 | && mkdir ~/.cache \ 23 | && mkdir -p ~/.config/godot \ 24 | && mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.stable \ 25 | && unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \ 26 | && mv Godot_v${GODOT_VERSION}-stable_linux_headless.64 /usr/local/bin/godot \ 27 | && unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz \ 28 | && mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable \ 29 | && rm -f Godot_v${GODOT_VERSION}-stable_export_templates.tpz Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip 30 | 31 | # Make needed directories for container 32 | RUN mkdir /godotapp 33 | RUN mkdir /godotbuildspace 34 | 35 | # Move to the build space and export the .pck 36 | WORKDIR /godotbuildspace 37 | RUN git clone ${HTTPS_GIT_REPO} . 38 | RUN godot --path /godotbuildspace --export-pack ${GODOT_EXPORT_PRESET} ${GODOT_GAME_NAME}.pck 39 | RUN mv ${GODOT_GAME_NAME}.pck /godotapp/ 40 | 41 | # Change to the godotapp space, delete the source, and run the app 42 | WORKDIR /godotapp 43 | run rm -f -R /godotbuildspace 44 | CMD godot --main-pack ${GODOT_GAME_NAME}.pck -------------------------------------------------------------------------------- /manual-export/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | godot: 5 | build: . 6 | ports: 7 | - "12345:12345" 8 | - "12345:12345/udp" 9 | tty: true 10 | container_name: godot-server -------------------------------------------------------------------------------- /manual-export/dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | 3 | # Environment Variables 4 | ENV GODOT_VERSION "3.2.3" # Version of Godot to download 5 | ENV GODOT_GAME_NAME "" # Name of the PCK file you want to run on the server 6 | ENV HTTPS_GIT_REPO "" 7 | 8 | # Updates and installs 9 | RUN apk update 10 | RUN apk add --no-cache bash 11 | RUN apk add --no-cache wget 12 | RUN apk add --no-cache git 13 | 14 | # Allow this to run Godot 15 | RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk 16 | RUN apk add --allow-untrusted glibc-2.31-r0.apk 17 | 18 | # Download Godot, version is set from environment variables 19 | RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux_server.64.zip \ 20 | && mkdir ~/.cache \ 21 | && mkdir -p ~/.config/godot \ 22 | && unzip Godot_v${GODOT_VERSION}-stable_linux_server.64.zip \ 23 | && mv Godot_v${GODOT_VERSION}-stable_linux_server.64 /usr/local/bin/godot \ 24 | && rm -f Godot_v${GODOT_VERSION}-stable_linux_server.64.zip 25 | 26 | # Make directory to run the app from and then run the app 27 | RUN mkdir /godotapp 28 | WORKDIR /godotapp 29 | RUN git clone ${HTTPS_GIT_REPO} . 30 | CMD godot --main-pack ${GODOT_GAME_NAME}.pck --------------------------------------------------------------------------------