From 6eedc1ec215af9b3b4ccc2a16746f3b788285fc2 Mon Sep 17 00:00:00 2001 From: Herwin Bozet Date: Wed, 11 Nov 2026 14:01:05 +0100 Subject: [PATCH] Build the server image on the registry's PureBasic image Docker/Server now compiles on git.nibblepoker.lu/packages/purebasic:6.41-linux3-trixie-slim (private: needs a docker login) instead of a local compiler image, so Docker/Compiler and its hand-copied PureBasic archive are gone. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RwFeVRXRpeMy93si5a8cPW --- CLAUDE.md | 5 +++-- Docker/Compiler/.dockerignore | 3 --- Docker/Compiler/.gitignore | 2 -- Docker/Compiler/Dockerfile | 22 ---------------------- Docker/Server/Dockerfile | 12 +++++++++--- Notes.md | 12 +++++++----- 6 files changed, 19 insertions(+), 37 deletions(-) delete mode 100644 Docker/Compiler/.dockerignore delete mode 100644 Docker/Compiler/.gitignore delete mode 100644 Docker/Compiler/Dockerfile diff --git a/CLAUDE.md b/CLAUDE.md index 11036b9..ec84b15 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,8 +40,9 @@ operations come before security hardening (`Notes.md`, "Threat model"). - `Release.ps1 [-Force]` builds the release with 6.40 into `Release\` and smoke-tests it (`-Force` replaces an existing folder of the same name). - Linux: same sources and flags (`-t`, `-e`, `-so` for the DLL), with - `libsodium-dev`. `Docker/Compiler/` and `Docker/Server/` build the - compiler and server images, see their Dockerfiles. + `libsodium-dev`. `Docker/Server/` builds the server image, on the + PureBasic image `git.nibblepoker.lu/packages/purebasic` (6.41, linux3; + needs a `docker login`), see its Dockerfile. ## Test diff --git a/Docker/Compiler/.dockerignore b/Docker/Compiler/.dockerignore deleted file mode 100644 index a28b0bd..0000000 --- a/Docker/Compiler/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!Dockerfile -!*.tgz diff --git a/Docker/Compiler/.gitignore b/Docker/Compiler/.gitignore deleted file mode 100644 index 92c110c..0000000 --- a/Docker/Compiler/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# The PureBasic archive copied here to build the image: licensed, not shared. -*.tgz diff --git a/Docker/Compiler/Dockerfile b/Docker/Compiler/Dockerfile deleted file mode 100644 index 8e827ac..0000000 --- a/Docker/Compiler/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# PureBasic compiler image, console programs only (no GUI libraries). -# -# PureBasic's Linux build needs glibc 2.38+, hence Debian 13 (glibc 2.41). -# The PureBasic archive isn't in git (it's licensed): copy it next to this -# file first, then: -# docker build -t purebasic:6.41 --build-arg PUREBASIC_ARCHIVE=PureBasic_Linux3_X64_6.41_xxxx.tgz Docker/Compiler -# docker run --rm -v "$PWD":/src -w /src purebasic:6.41 pbcompiler -t Server/BakaShrot_Server.pb -e Build/BakaShrot_Server -# Both backends are on the PATH: pbcompiler (asm) and pbcompilerc (C). - -FROM debian:trixie-slim - -# gcc links every program (and is the C backend), libssl-dev is for -# PureBasic's Network library. -RUN apt-get update \ - && apt-get install -y --no-install-recommends gcc libc6-dev libssl-dev \ - && rm -rf /var/lib/apt/lists/* - -ARG PUREBASIC_ARCHIVE -ADD ${PUREBASIC_ARCHIVE} /opt/ - -ENV PUREBASIC_HOME=/opt/purebasic -ENV PATH=/opt/purebasic/compilers:$PATH diff --git a/Docker/Server/Dockerfile b/Docker/Server/Dockerfile index 479d7f3..cb1445e 100644 --- a/Docker/Server/Dockerfile +++ b/Docker/Server/Dockerfile @@ -1,9 +1,13 @@ # BakaShrot server image. # -# Built from the repository's root, with the compiler image (Docker/Compiler) -# already built, and the PB-MessagePack submodule checked out: +# Built from the repository's root, with the PB-MessagePack submodule checked +# out and a login to the registry holding the PureBasic images (they're +# licensed, so not public): # git submodule update --init --recursive +# docker login git.nibblepoker.lu # docker build -t bakashrot-server -f Docker/Server/Dockerfile . +# Another compiler image: --build-arg COMPILER_IMAGE=, any Debian 13 +# (trixie) image with PureBasic's compilers on the PATH, gcc and libssl-dev. # # Run it with a config and a volume for the database: # docker run -d --name bakashrot -p 12345:12345 \ @@ -22,7 +26,9 @@ # --- Build --------------------------------------------------------------------- -ARG COMPILER_IMAGE=purebasic:6.41 +# PureBasic 6.41 for linux3 (PureBasic's newest Linux build) on +# debian:trixie-slim, the same Debian as the runtime stage below. +ARG COMPILER_IMAGE=git.nibblepoker.lu/packages/purebasic:6.41-linux3-trixie-slim FROM ${COMPILER_IMAGE} AS build RUN apt-get update \ diff --git a/Notes.md b/Notes.md index 53ce6d4..e8a0bc9 100644 --- a/Notes.md +++ b/Notes.md @@ -671,10 +671,12 @@ still say the old names where they tell what was done then. `OpenConsole()`, `poll()`ing 250 ms at a time. Checked with no input, piped commands (CRLF too), a terminal, `quit`, both signals, on 5.73 and 6.41. -- **`Docker/`**: `Compiler/` (PureBasic 6.41 on `debian:trixie-slim`, the - archive copied in by hand, never committed) and `Server/` (multi-stage: - built with the C backend and the optimizer, run on `debian:trixie-slim` - with libsodium and SQLite only, as user `bakashrot`). Config +- **`Docker/Server/`** (multi-stage: built with the C backend and the + optimizer on `git.nibblepoker.lu/packages/purebasic:6.41-linux3-trixie-slim`, + run on `debian:trixie-slim` with libsodium and SQLite only, as user + `bakashrot`). The compiler image was `Docker/Compiler/` at first, built + from a PureBasic archive copied in by hand; removed for the registry's + (2026-11-11, needs a `docker login`, it's licensed). Config `/etc/bakashrot/server.ini`, data volume `/var/lib/bakashrot`, port 12345. Checked: pushes, reads and queries through the port, `docker stop` clean (~0.3 s, exit 0), data kept over a restart, commands with `-i`. Alpine was @@ -831,7 +833,7 @@ network**, not exposed to the internet. So: - Protocol 6: error codes everywhere, at-least-once delivery accepted (2026-11-09). - Linux: every suite passes, the server runs without a console there, - `Docker/` images for the compiler and the server (2026-11-10). + a `Docker/` image for the server (2026-11-10). ## To check against Review.md