mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RwFeVRXRpeMy93si5a8cPW
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
*
|
||||
!Dockerfile
|
||||
!*.tgz
|
||||
@@ -1,2 +0,0 @@
|
||||
# The PureBasic archive copied here to build the image: licensed, not shared.
|
||||
*.tgz
|
||||
@@ -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
|
||||
@@ -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=<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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user