glance
glance copied to clipboard
refactor: enhance Dockerfile with build args and optimized caching
What's changing
Refactored the Dockerfile to make it easier to maintain and faster to build.
Why
- Build args let us update versions without editing the whole file
- Restored the mod cache layer so rebuilds are faster when you only change code
- Using the same Alpine version everywhere keeps things consistent
What I did
- Added
GO_VERSIONandALPINE_VERSIONas build args - Re-added the
go mod downloadstep (better caching) - Used the Alpine arg in the final stage instead of hardcoding
- Cleaned up spacing for readability