Commit c0d5749
committed
🔒 fix: add .dockerignore to keep .env and .venv out of image layers
Both Dockerfiles COPY . . and Docker does not read .gitignore, so a
developer building with a real .env present would bake
HUGGINGFACE_HUB_TOKEN and API_KEY into an image layer permanently
(a later rm does not remove layer contents). docker-compose.yml already
bind-mounts ./.env:/app/.env:ro at runtime, so the build never needs it.
Also excludes .venv (~1 GB locally) and generated transcript artifacts;
build context drops from ~1 GB to ~41 kB.
*.txt is excluded with a !requirements.txt negation because both
Dockerfiles COPY requirements.txt before the main COPY.
Also: pin Python 3.13 via .python-version, update README prerequisites,
and document in the CUDA Dockerfile why the ubuntu22.04 base is correct
(Python 3.13 already comes from deadsnakes, not the system 3.10).
Verified with a dummy .env and a populated 981 MB .venv in the context:
probe image with the same COPY directives shows .env and .venv absent,
requirements.txt and all app files present.1 parent 554047d commit c0d5749
4 files changed
Lines changed: 52 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
2 | 10 | | |
3 | 11 | | |
4 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments