From 053be262c2f4b7c4d1455e0b1c693a9a5eb36d04 Mon Sep 17 00:00:00 2001 From: RallyBlock Date: Sat, 7 Mar 2026 19:30:21 -0500 Subject: [PATCH] Upload files to "/" --- Dockerfile | 71 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 43 ++++++++++++++++++++++++++++ docker-compose.yml | 20 +++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bbcee2d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,71 @@ +FROM debian:bookworm-slim + +ARG DEBIAN_FRONTEND=noninteractive \ + TINI_VERSION=0.19.0 \ + WINE_PGP_URL=https://dl.winehq.org/wine-builds/winehq.key \ + WINE_SRC_URL=https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources \ + WINE_FLAVOUR=stable \ + WINE_VERSION=8.0.2~bookworm-1 \ + USER_ID=1000 \ + GROUP_ID=1000 + +# Install tini +ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini /tini + +RUN chmod +x /tini \ + && dpkg --add-architecture i386 \ + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + gnupg \ + ca-certificates \ + curl \ + xauth \ + xvfb \ + iproute2 \ + && mkdir -pm755 /etc/apt/keyrings \ + && curl -fsSL -o /etc/apt/keyrings/winehq-archive.key ${WINE_PGP_URL} \ + && curl -fsSL -o /etc/apt/sources.list.d/winehq.sources ${WINE_SRC_URL} \ + && apt-get update -y \ + && apt-get install -y --no-install-recommends \ + winehq-${WINE_FLAVOUR}=${WINE_VERSION} \ + wine-${WINE_FLAVOUR}=${WINE_VERSION} \ + wine-${WINE_FLAVOUR}-amd64=${WINE_VERSION} \ + wine-${WINE_FLAVOUR}-i386=${WINE_VERSION} \ + unzip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Create container user (Pelican compatible UID 1000) +RUN groupadd --gid $GROUP_ID blockland \ + && useradd --uid $USER_ID --gid $GROUP_ID --create-home --shell /bin/bash blockland + +USER blockland + +# Set Pelican working directory +WORKDIR /home/container + +# Copy scripts +COPY --chmod=0755 --chown=blockland:blockland bin/ /usr/local/bin/ + +# Environment defaults +ENV BL_DEDI_LAN=0 \ + BL_DTOKEN="" \ + BL_SERVER_NAME="Blockland_Server" \ + BL_MAX_PLAYERS=32 \ + BL_GAMEMODE="Custom" \ + BL_PORT=28000 \ + BL_EXTRA_ARGS="" \ + BL_INST_NUM_PROC=10 \ + BL_INST_FORCE=0 \ + BL_INST_OVERWRITE=0 \ + BL_PATCH_ENABLE=1 \ + BL_PATCH_EXE_URL=https://gitlab.com/-/project/19166101/uploads/7e9bc075056c3301fd1247975ecaa218/Blockland.> + BL_PATCH_LOADER_URL=https://gitlab.com/-/project/19166101/uploads/2970aa2d8c23259f8becb0f49630efcc/RedBloc> + BL_PATCH_WINEFIX_URL=https://gitlab.com/-/project/46964875/uploads/91958483cf78ffc270a09824336bd91a/WineFi> + WINEARCH=win32 \ + WINEDEBUG=-all + +EXPOSE 28000/udp +EXPOSE 28050/udp + +ENTRYPOINT ["/tini", "-g", "--", "/bin/bash", "-c", "run-bl"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..10d5be5 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Blockland Docker +A Docker image for running Blockland dedicated servers. Designed for use with [Pelican Panel](https://pelican.dev/) game server management. + +Based on [eagle517](https://hub.docker.com/r/eagle517/blockland-server)'s original Blockland Docker image. + +### How to use +This image is designed to run **inside a Pelican Panel egg**. Running it manually (e.g., with `docker run` or `docker compose`) will likely not work correctly, since it expects Pelican's environment (e.g., `/home/container` as the working directory and Pelican-managed volume mounts). + +Create a custom egg in Pelican that uses `rallyblockk/blockland-pelican` as its image, then configure the environment variables below. The container runs rootless (UID/GID 1000) by default—ensure your egg mounts volumes with appropriate permissions. + +The image is available on Docker Hub at [rallyblockk/blockland-pelican](https://hub.docker.com/r/rallyblockk/blockland-pelican). + +**Note:** Blockland works best with host networking due to UDP and Join IP behavior (see Networking section). Configure your Pelican egg to use host network mode where supported. + +### Environment variables +| Name | Type | Default | Description | +| -------------------- | ------------- | ----------------- | ----------- | +| BL_DEDI_LAN | bool (0 or 1) | 0 | Launches the server as a Dedicated or Dedicated LAN type. Note that DedicatedLANs are forced into using 28050 as their port. Blame Badspot, not me +| BL_DTOKEN | string | "" | Your [DToken](https://blockland.us/steam-dToken.php) for authentication +| BL_SERVER_NAME | string | Blockland_Server | The name shown on the server list. Underscores will be replaced with spaces by Blockland +| BL_MAX_PLAYERS | int | 32 | The max number of players that can join the server +| BL_GAMEMODE | string | Custom | The name of the gamemode to launch with +| BL_PORT | int | 28000 | The port to bind to, see the Network section below +| BL_EXTRA_ARGS | string | "" | Additional parameters to pass to the game as you see fit +| BL_INST_NUM_PROC | int | 10 | Number of parallel processes used to download the game files during installation +| BL_INST_FORCE | bool (0 or 1) | 0 | Forcefully install the game each time you launch +| BL_INST_OVERWRITE | bool (0 or 1) | 0 | Overwrite existing files during installation +| BL_UNZIP_ADDONS | bool (0 or 1) | 0 | When enabled, automatically extracts any .zip files in the Add-Ons directory before the server starts. Each zip is unzipped and the archive is removed. Handles single-folder, single-file, and multi-file zip structures so add-ons end up in properly named folders. +| BL_PATCH_ENABLE | bool (0 or 1) | 1 | Patches the game with RedBlocklandLoader and the WineFix DLL to make the console work with Wine 8.0.2 (See Wine section below) +| BL_PATCH_EXE_URL | string | See Dockerfile | URL to retrieve the patched Blockland.exe from for RedBlocklandLoader +| BL_PATCH_LOADER_URL | string | See Dockerfile | URL to retrieve RedBlocklandLoader.dll from +| BL_PATCH_WINEFIX_URL | string | See Dockerfile | URL to retrieve WineFix.dll from +| WINEARCH | string | win32 | Specifies the arch type Wine should create the prefix under +| WINEDEBUG | string | -all | Controls how much logging Wine does to the console (default hides everything) + +### Networking +Blockland uses UDP and can be finicky with Docker bridge networks. If your Pelican node supports it, configure the egg to use host network mode for the most reliable results. Host network is Linux-only. + +### Volumes +Pelican mounts the server's data directory at `/home/container` (the working directory). The egg configuration in Pelican determines what gets persisted. The container runs as UID/GID 1000—Pelican typically handles permissions for mounted volumes, but if you run into permission issues, that may be the cause. + +### Wine +Wine seems to be having less and less compatibility with Blockland as time goes on. Back when Wine 5.18 came out, we lost the Curses backend, and it stopped being possible to interact with Blockland's console. I eventually figured out what the issue with Wine was, and created [Wine Fix](https://gitlab.com/Eagle517/wine-fix) which allowed console interaction to work with Wine up to 8.0.2. With Wine 9 and later, it appears the console is just completely broken now. I don't have the time to figure out what shenanigans the Wine devs got up to, so we're stuck with 8.0.2 for now. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3b85217 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +services: + blockland: + container_name: blockland + image: rallyblockk/blockland-pelican + stdin_open: true + tty: true + restart: unless-stopped + network_mode: host + environment: + BL_DTOKEN: "" # Get your dtoken from https://blockland.us/steam-dToken.php + BL_SERVER_NAME: "Blockland_Server" # Blockland will replace underscores with spaces + BL_MAX_PLAYERS: 32 + BL_GAMEMODE: "Custom" + BL_PORT: 28000 + volumes: + - ./blockland/Add-Ons:/data/Add-Ons + - ./blockland/config:/data/config + - ./blockland/saves:/data/saves + - ./blockland/modules:/data/modules + - ./blockland/base:/data/base \ No newline at end of file