image build improvements#476
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR contains several improvements to the Docker image build process and dependency updates.
Dockerfile changes
apt-getinvocation — split the double-apt-get installinto a single, properly structuredRUNlayer with one package per line. Previously the firstapt-get install -y --no-install-recommendswas a no-op (no packages listed), followed by a second install that didn't inherit--no-install-recommends. The new form is correct, readable, and lint-clean.COPY . .after allpip installsteps — theCOPY . .instruction was previously placed beforepip install django-prometheus gunicorn, which busted the Docker layer cache whenever any source file changed (even for packages that don't depend on app code). MovingCOPYlater means pip install layers are cached independently of source changes, speeding up iterative builds.pip install vastpy—vastpywas installed outsiderequirements.txtin its own layer. It has been moved intorequirements.txtso dependency management is centralized and the install is cacheable alongside other packages.requirements.txt changes
django-q21.5.1 → 1.7.6 — patch/minor upgrade to the async task queue library.ipython7.16.3 → 8.39.0 — major upgrade; IPython 8.x requires Python ≥ 3.8 and drops several deprecated APIs. Brings in security fixes and modern shell improvements.vastpyadded — moved from a barepip installin the Dockerfile into requirements.txt.python-dateutilremoved — no longer listed as a direct dependency; it is pulled in transitively by other packages (pandas, etc.).Test Plan
1. Local Docker build
Verify:
docker run --rm coldfront:test python -c "import vastpy; import IPython; print(IPython.__version__)"prints8.x.xdocker run --rm coldfront:dev-test python -c "import debug_toolbar"succeeds (dev extras present)2. Layer cache check
After the initial build, make a trivial source-file change (e.g., touch a
.pyfile) and rebuild:docker build -t coldfront:test .Confirm that the pip install layers are cache hits and only the
COPY . .layer and later are re-run. This validates the cache-ordering fix.3. django-q2 upgrade smoke test
4. IPython upgrade check
5. Full test suite
All tests must pass before merging.
6. Staging deploy
Before pushing to production:
docker compose logs coldfrontfor any import errors or deprecation warnings at startup.vastpyinstall path changed).