mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Run the server headless on Linux, add Docker images for it
The server no longer stops when it has no console input on Linux: it reads its own dup of stdin (taken before OpenConsole(), which closes fd 0; Input() returns "" at EOF there), and SIGTERM/SIGINT stop it like "quit". Windows is unchanged. Docker/Compiler: PureBasic 6.41 on debian:trixie-slim (the archive is copied in by hand and git-ignored). Docker/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 /etc/bakashrot/server.ini, volume /var/lib/bakashrot, port 12345. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RwFeVQCBfcPDfAPqX8z2TF
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user