Docker
Quick Start
Section titled “Quick Start”Prepare a folder where you are going to save your bbs files.
- Generate some config for your BBS:
You can perform this step from anywhere - but make sure to consistently run it from the same place to retain your config inside the docker guest.
docker run -it -p 8888:8888 \--name "ENiGMABBS" \-v "$(pwd)/config:/enigma-bbs/config" \-v "$(pwd)/db:/enigma-bbs/db" \-v "$(pwd)/logs:/enigma-bbs/logs" \-v "$(pwd)/filebase:/enigma-bbs/filebase" \-v "$(pwd)/art:/enigma-bbs/art" \-v "$(pwd)/mods:/enigma-bbs/mods" \-v "$(pwd)/mail:/mail" \enigmabbs/enigma-bbs:latest- Run it:
You can use the same command as above, just daemonize and drop interactiveness (we needed it for config but most of the time docker will run in the background)
docker run -d -p 8888:8888 \--name "ENiGMABBS" \-v "$(pwd)/config:/enigma-bbs/config" \-v "$(pwd)/db:/enigma-bbs/db" \-v "$(pwd)/logs:/enigma-bbs/logs" \-v "$(pwd)/filebase:/enigma-bbs/filebase" \-v "$(pwd)/art:/enigma-bbs/art" \-v "$(pwd)/mods:/enigma-bbs/mods" \-v "$(pwd)/mail:/mail" \enigmabbs/enigma-bbs:latestRestarting and Making changes
Section titled “Restarting and Making changes”If you make any changes to your host config folder they will persist, and you can just restart ENiGMABBS container to load any changes you’ve made.
docker restart ENiGMABBSOnce the container is up, test your installation.
Architecture and file transfers
Section titled “Architecture and file transfers”Images are published for linux/amd64, linux/arm64 and linux/arm/v7, each built natively,
and every one of them ships a matching sexyz. All four default X/Y/ZModem handlers work out
of the box on all three, as does ZModem 8k (zmodem8kSz), which uses sz/rz from
lrzsz.
The sexyz binaries are cross compiled from Synchronet’s own source rather than downloaded —
upstream publishes ready-made builds for Win32 only. docker/sexyz/build.sh does the build and
docker/sexyz/manifest.json records which upstream commit each one came from. The image build
runs sexyz v after selecting the binary, so an architecture mismatch fails the build instead
of reaching users (which is what #797
was).
See File Transfer Protocols for the full picture.
Volumes
Section titled “Volumes”Containers by their nature are ephermeral. Meaning, stuff you want to keep (config, database, mail) needs to be stored outside of the running container. As such, the following volumes are mountable:
| Volume | Usage |
|---|---|
| /enigma-bbs/art | Art, themes, etc |
| /enigma-bbs/config | Config such as config.hjson, menu.hjson, prompt.hjson, SSL certs etc |
| /enigma-bbs/db | ENiGMA databases |
| /enigma-bbs/filebase | Filebase |
| /enigma-bbs/logs | Logs |
| /enigma-bbs/mods | ENiGMA mods |
| FTN mail (for use with an external mailer) |
Building your own image
Section titled “Building your own image”Customising the Docker image is easy!
- Clone the ENiGMA-BBS source.
- Build the image
docker build -t enigmabbs -f ./docker/Dockerfile .The Dockerfile has two stages. A build stage installs a compiler toolchain and runs
npm ci, which is where the native modules (node-pty, better-sqlite3 and friends) are
compiled. The stage that ships installs only the runtime packages — the archivers and
lrzsz — and copies node_modules out of the build stage, so no compiler reaches the
published image (#814). Because the
compiled modules are copied rather than rebuilt, both stages must start from the same base
image; keep them in step if you change one.
ENIGMA_DOCKER_LIVE=1 npm run test:live builds the image and checks it from the inside:
that the toolchain is absent, the archivers and sexyz are present, and the copied native
modules load. Point ENIGMA_DOCKER_IMAGE at a tag to check an image you already have.
- Run the image
docker run -it -p 8888:8888 --name "ENiGMABBS" -v "$(pwd)/config:/enigma-bbs/config" -v "$(pwd)/db:/enigma-bbs/db" -v "$(pwd)/logs:/enigma-bbs/logs" -v "$(pwd)/filebase:/enigma-bbs/filebase" -v "$(pwd)/art:/enigma-bbs/art" -v "$(pwd)/mods:/enigma-bbs/mods" -v "$(pwd)/mail:/mail" enigmabbs