Repository navigation
Docker Reforger - Improvements to Base Image - #62
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the container base and hardens the project’s build/CI pipeline while expanding server configuration support by centralizing env→config generation logic and documenting the new options.
Changes:
- Upgrade Docker base image to Debian bookworm and add a container healthcheck (A2S-based when enabled).
- Refactor configuration generation into
launch_config.pyand add pytest coverage for env-driven config behavior. - Add/adjust CI + linting tooling (pinned GitHub Actions SHAs, new CI workflow, hadolint via pre-commit) and expand README documentation.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
Dockerfile |
Upgrade base image, add new env knobs, and add HEALTHCHECK execution. |
healthcheck.py |
Implements A2S_INFO-based health probing with config/env fallback. |
launch.py |
Switches to centralized config builder and warms up SteamCMD before install. |
launch_config.py |
New module encapsulating env-driven server config generation logic. |
test_launch_config.py |
New pytest suite covering config generation behavior and validation. |
README.md |
Documents new env vars (RCON/persistence/operating/mission header) and healthcheck behavior. |
.github/workflows/ci.yaml |
Adds CI jobs for linting and running pytest. |
.github/workflows/ghcr.yaml |
Pins action SHAs for supply-chain hardening. |
.github/workflows/lint.yaml |
Removes the previous standalone lint workflow (replaced by ci.yaml). |
.pre-commit-config.yaml |
Adds pre-commit hadolint hook configuration. |
.hadolint.yaml |
Adds hadolint rule ignore configuration. |
.dockerignore |
Reduces Docker build context (ignores git/GitHub metadata, docs, etc.). |
.gitignore |
Ignores Python cache and additional local tooling directories. |
scripts/build.sh |
Adds a helper script for building a local test image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Simplify launcher config handling * Restore force-kill safety net on repeated shutdown signal * Apply black formatting * Fix isort import grouping in tests * Bump setup-python to v6 (Node 24 runtime) * Apply black formatting to healthcheck.py
Docker rejects uppercase repository names, so the publish job failed tagging ghcr.io/AngriestBird/... . Compute the tag at runtime and lowercase the owner via bash parameter expansion.
|
@BrettMayson I resolved the issues you posted and then fixed the linting issues. |
|
Second batch of findings should be fixed. |
|
@BrettMayson The findings have been fixed. Please review again when you have a moment. |
* Add safe automatic workshop mod pruning * Fixed the cleanup here * Fix super-linter yamllint and derive GHCR image from repo - Add .github/linters/.yaml-lint.yml (super-linter defaults plus truthy: check-keys: false) so the on: key no longer fails under YAML_ERROR_ON_WARNING. - Publish job derives the image path from github.repository (ghcr.io/<owner>/<repo>) instead of a hardcoded arma-reforger name, so forks publish to their own owner/repo and upstream stays ghcr.io/acemod/docker-reforger. Publish still gated to main pushes and tags :latest plus :sha-<short>. - Bump the CI test job to Python 3.14. * Fix Python lint failures * Fix lint suppressions and restructure into src/ The pylintrc disabled R0914, R0912 and R0915 and told pylint to ignore pytest imports instead of fixing what they flagged. prune_mods is now split into scan, retain, validate and delete helpers, and the env to config mapping in build_config is table driven. Both are behavior preserving. build_config was diffed against the old one across 3412 env combinations with no divergence. Linting only ever ran on changed files, so most of the repo was never checked. Running it everywhere found an unencoded open() and a bare except in healthcheck.py, plus four issues in the steam query script. Also: - Move app code to src/, copied to /app in the image - Move tests to tests/ and add pruning and env mapping coverage - Replace requirements-dev.txt with PEP 735 dependency groups - Consolidate Python and hadolint config, one file each - Run black, isort and pylint in the test job where the deps exist - Fix ARMA_CONFIG docs, a custom config needs its .json extension * Fix README terminology lint failure
| -e SERVER_PUBLIC_ADDRESS="public ip" \ | ||
| -e GAME_NAME="My Docker Reforger Server" \ | ||
| ghcr.io/acemod/arma-reforger:latest | ||
| ghcr.io/angriestbird/docker-reforger:latest |
There was a problem hiding this comment.
Well we can't merge this now
There was a problem hiding this comment.
Reverted that. That was me doing testing working that I was messing with. Sorry about that @BrettMayson!
It should be pushed and cleared provided I got them all.
I forgot I had this pending so merged some of the code I was working on as a suggestion piece. If we want to do split PRs, I am more than happy to do that as well. Please let me know.
|
Fixed "" as requested. Re-tested image and worked as expected. |
Changes
Security
Stylization
Additions/Features