Overview
Refactor Dockerfile-aws to use a multi-stage build to reduce the final production image size. This removes build-time dependencies and temporary files that don't need to be in the final image.
Action Items
Acceptance Criteria
- Multi-stage build is implemented in
Dockerfile-aws
- Final image size is smaller than the single-stage version
- App starts and serves static files correctly in the optimized image
- Build process completes without errors
- Image size comparison is documented (in commit message or PR description)
References
- Docker multi-stage builds
- We're not sure how much this will reduce the image size, since we already have method to remove build caches from the image.
Parent Issue: #219
Blocked by: #219 sub-issue "Add gunicorn and Whitenoise, and set up Dockerfile-aws and entrypoint-aws.sh"
Overview
Refactor
Dockerfile-awsto use a multi-stage build to reduce the final production image size. This removes build-time dependencies and temporary files that don't need to be in the final image.Action Items
app/Dockerfile-awsto use a multi-stage build:collectstaticAcceptance Criteria
Dockerfile-awsReferences
Parent Issue: #219
Blocked by: #219 sub-issue "Add gunicorn and Whitenoise, and set up Dockerfile-aws and entrypoint-aws.sh"