Add a .dockerignore (closes #39) #41

Merged
clawbot merged 1 commits from issue-39-dockerignore into next 2026-09-29 07:42:21 +02:00
Collaborator

Adds a .dockerignore, which REPO_POLICIES.md lists among the files every repo has. Until now every docker build sent the whole working tree as its build context, .git and any local build output included, and the image's source archive is made from that context.

It keeps out .git; the output of make build, make run and make asupdate; test binaries, coverage profiles and *.tar.zst archives; local databases; .env; a local Go workspace (go.work); and .DS_Store. Every tracked file stays in, so the format check, the linter, the tests, the build and the source archive read the same files as before. TODO.md is updated.

Docker's patterns are not .gitignore patterns: they match from the root of the build context, so entries meant for every directory start with **/. The file says so at the top.

  • Judgement call: the list is this repo's own local output plus the local-only files its .gitignore names. The longer template in sneak/prompts also excludes private keys, editor files and .claude; those are left out as beyond the issue. Local databases and .env are in because they would otherwise ship inside the image's source archive.
  • Without .git in the context, the binary's Go build info records no git revision. Nothing in routewatch reads it; the version routewatch reports comes from build flags the Dockerfile does not pass.
  • make fmt formats only Go here; the TODO.md lines were wrapped by hand.
  • No test added: the change is Docker build configuration, with no Go code.

Closes #39

Model: opus-5-5

Adds a `.dockerignore`, which `REPO_POLICIES.md` lists among the files every repo has. Until now every `docker build` sent the whole working tree as its build context, `.git` and any local build output included, and the image's source archive is made from that context. It keeps out `.git`; the output of `make build`, `make run` and `make asupdate`; test binaries, coverage profiles and `*.tar.zst` archives; local databases; `.env`; a local Go workspace (`go.work`); and `.DS_Store`. Every tracked file stays in, so the format check, the linter, the tests, the build and the source archive read the same files as before. `TODO.md` is updated. Docker's patterns are not `.gitignore` patterns: they match from the root of the build context, so entries meant for every directory start with `**/`. The file says so at the top. - Judgement call: the list is this repo's own local output plus the local-only files its `.gitignore` names. The longer template in `sneak/prompts` also excludes private keys, editor files and `.claude`; those are left out as beyond the issue. Local databases and `.env` are in because they would otherwise ship inside the image's source archive. - Without `.git` in the context, the binary's Go build info records no git revision. Nothing in routewatch reads it; the version routewatch reports comes from build flags the Dockerfile does not pass. - `make fmt` formats only Go here; the `TODO.md` lines were wrapped by hand. - No test added: the change is Docker build configuration, with no Go code. Closes https://git.eeqj.de/sneak/routewatch/issues/39 Model: opus-5-5
clawbot added the needs-review label 2026-09-29 07:15:07 +02:00
clawbot self-assigned this 2026-09-29 07:15:07 +02:00
clawbot added 1 commit 2026-09-29 07:15:08 +02:00
Add a .dockerignore (closes #39)
check / check (push) Successful in 2m51s
00c7248008
Every docker build sent the whole working tree as its build context, .git and any local build output included, and the image's source archive is made from that context. The new .dockerignore keeps out .git, the output of make build, make run and make asupdate, test binaries, coverage profiles, source archives, local databases, .env and a local Go workspace. Every tracked file stays in, so the format check, the linter, the tests, the build and the source archive read the same files as before.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot removed the needs-review label 2026-09-29 07:32:28 +02:00
clawbot merged commit 057e0bd9a9 into next 2026-09-29 07:42:21 +02:00
clawbot deleted branch issue-39-dockerignore 2026-09-29 07:42:21 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#41