IMGIITRoorkee / IMGIITRoorkee/chakra-docker

Build scripts pass --no-cache unconditionally

Open Beginner friendly
#22 0 comments 0 reactions 0 assignees View on GitHub
audit effort:S performance sev:high
Dominant language
HTML
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Every image build re-downloads ~250 MB of apt packages and re-resolves and re-compiles every pip wheel — `psycopg2`, `Pillow`, `lxml`, `numpy`, `pandas` from source. A ~30-second rebuild becomes 5-15 minutes, every time.

The layer ordering is actually **correct already** — `django/Dockerfile:27` copies `requirements.txt` before anything else, and application code is bind-mounted rather than `COPY`d, so code changes never bust the cache. `--no-cache` is throwing away a cache that was designed properly.

**Fix:** delete the flag. If a forced rebuild is occasionally wanted, make it opt-in: `${NO_CACHE:+--no-cache}`.

---

**Evidence**

```
scripts/build/django.sh:15; scripts/build/next.sh:33
```

- Verified against: `origin/master 44ca47e (2026-07-25)`
- Verdict: **CONFIRMED**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with scripts/build/django.sh:15 and scripts/build/next.sh:33, then review django/Dockerfile:27 to understand the intended cache boundary. Run the build scripts before and after the change and verify normal builds reuse cached dependency layers while NO_CACHE can still request a forced rebuild.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python, shell
Domain
build-system, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.