Conversation
- Publish the image for linux/arm/v7 alongside amd64 and arm64. The Go binary is cross-compiled on the build platform, so only the runtime stage runs under QEMU. - Build static Linux binaries (amd64, arm64, armv7) with GoReleaser and attach them, with checksums, to each published GitHub release. CI builds a snapshot so a broken config fails on the PR. - Enable gosec in golangci-lint. Byte counts from Docker and statfs now saturate instead of wrapping; the remaining findings are annotated with why they are safe. - ENTRYPOINT is now ["/app/docktail"]. The shell's `sleep 1` gave a starting tailscaled a head start; DockTail now waits for the socket itself (up to 15s) before the version check and the first reconcile. - Drop iptables/ip6tables from the runtime image. They came in with the Alpine tailscale package; the image only carries the tailscale CLI and runs no daemon.
…g release 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.
Stacked on #93. Merge that one first. Until it merges, this diff also shows #93's commit. This PR's own commits are the last two.
What changes
armv7 image. The image now also builds for
linux/arm/v7(Raspberry Pi 2/3, older 32-bit ARM NAS boxes), next to amd64 and arm64. The base images (golang:1.25-alpine,alpine,tailscale/tailscale) all publish arm/v7. The builder stage now runs on$BUILDPLATFORMand cross-compiles (CGO is off). QEMU only runs the runtime stage'sapk add, not the Go toolchain. The CI docker matrix gained the same leg. Each arch in the release workflow now gets its own GHA cache scope, so the three legs no longer overwrite each other's cache.Release binaries.
.goreleaser.yamlbuilds static Linux binaries for amd64, arm64 and armv7, pluschecksums.txt. They carry the same-X github.com/marvinvr/docktail/version.Version=<tag>stamp as the image. The newrelease.yamlruns when a GitHub release is published, or by hand with a tag. It runs GoReleaser with--skip=publishand uploads the archives withgh release upload, so the release's hand-written name and notes stay untouched. It deliberately does not run on every tag push: tags are cut much more often than releases, and running on each one would create a release per tag. A newrelease-snapshotCI job builds the archives on every PR, so a broken config fails here rather than on release day.gosec. Enabled through golangci-lint. Two kinds of finding were real fixes:
statfsnow saturate instead of wrapping negative.Every other finding has a
//nolint:gosecwith the reason:math/rand)tailscalebinary exec'd with argv onlyENTRYPOINT ["/app/docktail"]. Thesh -c "sleep 1 && exec …"wrapper is gone. The sleep did have a job: with a sidecar behind a plaindepends_on, tailscaled may not be listening yet, and the first reconcile then fails and waits a fullRECONCILE_INTERVAL. The socket watchdog does not cover that case; it only avoids exiting before the socket was ever seen. DockTail now waits for the socket itself, up to 15s, before the version check and the first reconcile. It returns as soon as the socket is reachable, logs a warning if it never becomes reachable, and exits cleanly on SIGTERM during the wait.Runtime packages.
iptables/ip6tablesare dropped. They came in with the oldapk add tailscaleinstall. The image now only copies thetailscaleCLI and runs no daemon, and nothing in DockTail uses them.Docs.
docs/02-installation.mdgets a new Platforms And Release Binaries section: the image platforms, the binaries, and what the binary needs outside a container. The same page covers thetailscaleCLI onPATH, socket access, and a restart supervisor. Also updated: the startup-wait note indocs/07-reference.md, the simplerdocker run … --versionthere, and a one-line pointer in the README.Release-notes worthy
command:or extradocker runargs) used to be dropped silently by the shell wrapper. They now reachdocktail, which rejects unknown arguments.docker run ghcr.io/marvinvr/docktail --versionnow works directly.Refs marvinvr/docktail-cloud#103