-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.dockerignore
More file actions
28 lines (25 loc) · 1015 Bytes
/
.dockerignore
File metadata and controls
28 lines (25 loc) · 1015 Bytes
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
# Exclude everything by default, then allowlist only what the Dockerfiles need.
# This keeps the CDK asset fingerprint stable — only changes to actual service
# code (gco/, cli/, pyproject.toml, dockerfiles/) trigger a Docker rebuild.
*
# Allow the source packages and build config
!gco/
!cli/
!pyproject.toml
!requirements-lock.txt
!dockerfiles/
# Re-exclude generated/cache dirs inside the allowed paths
gco/**/__pycache__/
cli/**/__pycache__/
gco/**/*.pyc
cli/**/*.pyc
gco/**/*.pyo
cli/**/*.pyo
# gco/stacks/ is intentionally NOT excluded. Earlier versions dropped it
# from the container build context to keep service images slim and to
# stabilise the CDK asset fingerprint against CDK-only edits, but that
# also meant `gco stacks deploy-all` didn't work inside Dockerfile.dev —
# which is the canonical place to run CDK commands from. The extra ~20
# Python files cost negligible image size, and service containers never
# import anything under gco.stacks at runtime, so the tradeoff is
# worthwhile.