Repository navigation
Expand file tree
/
Copy path.dockerignore
More file actions
33 lines (33 loc) · 1.76 KB
/
Copy path.dockerignore
File metadata and controls
33 lines (33 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Allowlist: the docker build context is the repo root, and NOTHING else may
# ride along. Two reasons this matters:
# - .sc/ holds DECRYPTED secrets after `sc secrets reveal` runs in CI — it
# must never enter a build context.
# - the context used to ship docs/, dist/, .git/ etc. for a build that needs
# none of them.
#
# The source tree is NO LONGER in the allowlist. `!cmd`, `!pkg`, `!internal`,
# `!go.sum` and `!tools.go` existed solely for the `COPY . .` in the `gobuild`
# stages of github-actions.Dockerfile / cloud-helpers.aws.Dockerfile. Those
# stages were removed 2026-10-30: the binary is compiled natively by the
# caller and arrives via `COPY dist/<bin>` (see the comment on that line for
# why). `go.mod` stays — github-actions.Dockerfile's builder stage reads the
# pinned Pulumi version out of it.
#
# `dist/` is allowed PER FILE, not as a directory. A bare `!dist` would sweep
# in whatever a developer's local `welder run build-all` left there —
# `dist/linux-amd64/sc` and friends are ~70 MB each and belong in no image.
# Naming the two binaries keeps the context to exactly what is COPYed. The
# nested exception works under the leading `*` (verified 2026-10-30: a probe
# context with `!dist/github-actions` admitted that file and excluded both a
# sibling under dist/ and .sc/secrets.yaml).
#
# `bin` is NOT allowed. It was, solely because github-actions-staging.Dockerfile
# COPYed ./bin/github-actions built on the host by welder; both that Dockerfile
# and build-staging.yml were removed 2026-10-20. caddy.Dockerfile's
# `COPY --from=builder /usr/bin/caddy` is a build STAGE, not the host context,
# so nothing needs it now — and keeping it would ship a local 565 MB bin/sc
# into every build context.
*
!go.mod
!dist/github-actions
!dist/cloud-helpers