Repository navigation
build: add Alpine image for all kouja commands - #14
Merged
Merged
Conversation
added 3 commits
November 12, 2026 19:25
Add a multi-stage Dockerfile that builds the embedded admin UI and every command under cmd/. The runtime image installs the LVM, device-mapper, udev, util-linux, iSCSI, NVMe, and ext4/XFS tools used by the agent and CSI node, applies base package security upgrades, and defaults to kouja-agent while allowing every binary to be invoked directly. Add .dockerignore to keep build artifacts, generated UI assets, node_modules, and image archives out of the build context.
Address CVE-2026-78661 and CVE-2026-97045 reported by Trivy against golang.org/x/net/html in the statically linked command binaries.
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.
Summary
Adds a multi-stage Alpine image for the full command suite.
cmd/: agent, backup, restore, CSI controller, CSI node, and the Terraform provider.kouja-agent, while any binary can be run directly (docker run IMAGE kouja-backup ...).lvm2,device-mapper,eudev,util-linux,nvme-cli,open-iscsi,e2fsprogs(-extra), andxfsprogs(-extra).entrypoint-node.shand the example config..dockerignorefor build artifacts, generated UI assets,node_modules, and image archives.Security
apk upgrade --no-cacheso the image picks up Alpine security fixes (notably zlib CVE-2026-4738 to 1.4-r0).golang.org/x/netfrom 0.61.0 to 0.62.0 for CVE-2026-78661 and CVE-2026-97045.Verification
docker buildsucceeds and all six binaries are present.-h.kouja-agent -check-config -config deploy/config.example.yamlreturnsconfiguration valid.go test -tags=unitpasses for all packages.vgs/lvsagainst host devices works with--privileged,/dev, and/run/lvmmounts.Notes
The image runs as root and needs the host's LVM devices, configfs, and kernel modules, as required by the agent and CSI node.
systemctlis not included, so the NVMe/TCP readiness check still requires a systemd host or an equivalent runtime arrangement.