glance icon indicating copy to clipboard operation
glance copied to clipboard

refactor: enhance Dockerfile with build args and optimized caching

Open ABGEO opened this issue 1 month ago • 0 comments

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_VERSION and ALPINE_VERSION as build args
  • Re-added the go mod download step (better caching)
  • Used the Alpine arg in the final stage instead of hardcoding
  • Cleaned up spacing for readability

ABGEO avatar Nov 21 '25 15:11 ABGEO