Skip to content

fix(build): inject version via ldflags, fixes docker image showing "dev" - #189

Merged
mikeodr merged 1 commit into
tailscale:mainfrom
DAcodedBEAT:fix-version-on-release
Aug 20, 2026
Merged

mikeodr merged 1 commit into
tailscale:mainfrom
DAcodedBEAT:fix-version-on-release

Conversation

@DAcodedBEAT

Copy link
Copy Markdown
Contributor

Docker images built by containers.yaml show version=dev instead of the tag (e.g. found on v0.0.15).

The container build step ran plain go build with no ldflags, unlike the goreleaser release build which injects server.version via -X.


Changes made:

  • Add VERSION build-arg to Dockerfile, pass through via ldflags into server.version
  • containers.yaml now derives VERSION (tag with v stripped, matching goreleaser's .Version convention) and passes it as --build-arg

Found when pulling v0.0.15 - container build never passed the git tag
into the binary, unlike the goreleaser release build.

Signed-off-by: Arun Philip <arun@corkinc.com>
@mikeodr
mikeodr merged commit f004a33 into tailscale:main Aug 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants