Skip to content

Makefile: add docker-tailscale-debug target with persistent debug keystore#781

Merged
bradfitz merged 1 commit intomainfrom
bradfitz/docker
Apr 20, 2026
Merged

Makefile: add docker-tailscale-debug target with persistent debug keystore#781
bradfitz merged 1 commit intomainfrom
bradfitz/docker

Conversation

@bradfitz
Copy link
Copy Markdown
Member

The existing docker-run-build target is geared at release builds and
requires JKS signing env vars. There was no ergonomic path for the
common "iterate on a debug APK inside the build container" workflow.
Worse, every docker run produces an APK signed with a fresh ephemeral
debug keystore, so adb install -r refuses to update a prior install.

Add a docker-tailscale-debug target that builds the debug APK inside
the container, and bind-mount $(CURDIR)/.android-docker (gitignored)
at /root/.android in every docker-* target so the Gradle-generated
debug.keystore survives across invocations. Signer stays stable across
builds in the same checkout.

Note: mount target is /root/.android rather than the Dockerfile's
HOME=/build because the JVM's user.home resolves from /etc/passwd
(i.e. /root for uid 0), not from the HOME env var.

Made while working on #695

Updates #13174
Updates #695

@bradfitz bradfitz requested review from barnstar and nickoneill April 20, 2026 22:32
…store

The existing docker-run-build target is geared at release builds and
requires JKS signing env vars. There was no ergonomic path for the
common "iterate on a debug APK inside the build container" workflow.
Worse, every docker run produces an APK signed with a fresh ephemeral
debug keystore, so `adb install -r` refuses to update a prior install.

Add a docker-tailscale-debug target that builds the debug APK inside
the container, and bind-mount $(CURDIR)/.android-docker (gitignored)
at /root/.android in every docker-* target so the Gradle-generated
debug.keystore survives across invocations. Signer stays stable across
builds in the same checkout.

Note: mount target is /root/.android rather than the Dockerfile's
HOME=/build because the JVM's user.home resolves from /etc/passwd
(i.e. /root for uid 0), not from the HOME env var.

Made while working on #695

Updates #13174
Updates #695

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Copy link
Copy Markdown
Member

@barnstar barnstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This tripped me up last week too. I just gave it a BS key and password and it at least builds but this is much nicer.

@bradfitz bradfitz merged commit dcd2218 into main Apr 20, 2026
4 checks passed
@bradfitz bradfitz deleted the bradfitz/docker branch April 20, 2026 22:45
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