Docker image: multi-arch, --edit as container arg or FOGPING_EDIT env - #5
Merged
Merged
Conversation
- Dockerfile: cgo cross-compile via tonistiigi/xx, static musl binary on busybox - docker/entrypoint.sh: FOGPING_EDIT/USER/PASSWD/DAYS env -> flags; args pass through - .github/workflows/docker.yml: push to Docker Hub + GHCR on v* tags; PRs build + smoke test only - README: Docker section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBw6qLRx7jJVzXwfmxthbf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
参考 json-ping 的 Docker 方案,但 fogping 依赖 go-sqlite3(cgo),不能
CGO_ENABLED=0交叉编译:tonistiigi/xx在构建机原生架构跑 clang、链接目标架构 musl,全静态产出(xx-verify --static校验),不走 QEMU。运行层 busybox:musl,非 root(65532),/data卷,8518 端口,/api/version健康检查。docker run ... githubflyideas/fogping --edit user=admin passwd=xxx。另支持FOGPING_EDIT=1/FOGPING_USER/FOGPING_PASSWD/FOGPING_DAYS环境变量,给 Docker Desktop / NAS / RouterOS 这类只能填环境变量的场景。命令行参数排在后面,冲突时覆盖环境变量。--edit无登录仍会被程序拒绝启动。v*tag 推 Docker Hub + GHCR(amd64/arm64/arm/v7,provenance: false);PR 只构建 + amd64 冒烟测试,不推送。需要仓库 Variables
DOCKERHUB_USER、SecretsDOCKERHUB_TOKEN(与 json-ping 相同)。本地验证:同 tag 的 cgo 静态构建 +
go test通过;entrypoint 的 env/参数组合用真实二进制跑过(无登录 --edit 被拒、401、retention 生效)。镜像本身由本 PR 的 CI 验证。🤖 Generated with Claude Code
https://claude.ai/code/session_01JBw6qLRx7jJVzXwfmxthbf
Generated by Claude Code