add Dockerfile
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM fedora:latest
|
||||
|
||||
ARG GODOT_VERSION="4.3"
|
||||
ARG SERVER_PORT=10567
|
||||
ENV GODOT_FILE_NAME="Godot_v${GODOT_VERSION}-stable_linux.x86_64"
|
||||
|
||||
ENV GODOT_GAME_NAME="cadastery-server"
|
||||
|
||||
RUN dnf update -y
|
||||
RUN dnf install -y wget
|
||||
RUN dnf install -y unzip
|
||||
RUN dnf install -y wayland-devel
|
||||
RUN dnf install -y fontconfig
|
||||
|
||||
ADD https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable//${GODOT_FILE_NAME}.zip ./
|
||||
RUN mkdir -p ~/.cache \
|
||||
&& mkdir -p ~/.config/godot \
|
||||
&& unzip ${GODOT_FILE_NAME}.zip \
|
||||
&& mv ${GODOT_FILE_NAME} /usr/local/bin/godot \
|
||||
&& rm -f ${GODOT_FILE_NAME}.zip
|
||||
|
||||
WORKDIR /godotapp
|
||||
COPY . .
|
||||
|
||||
RUN godot --headless --export-pack "server" /godotapp/${GODOT_GAME_NAME}.pck
|
||||
|
||||
EXPOSE ${SERVER_PORT}/udp
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ENTRYPOINT godot --main-pack ${GODOT_GAME_NAME}.pck
|
||||
Reference in New Issue
Block a user