Docker: image optimizations
Docker Image Size reduced by 80% (from 447 MB to 89.4 MB and ~15 seconds faster builds)
Optimization changes Made:
- Added .dockerignore
- Excludes unnecessary files from build context
- Pinned Alpine version to 3.19
- The same Alpine version ensures consistent results across builds.
- The version can be updated as and when required.
- Combine apk add commands into single layer
- Reduces image layers and size
- Multi-stage build separating builder and runtime stages
- Smaller final image
- More secure as only runtime dependencies included in the final image
- Easier debugging and better build caching
- git submodules for vendor dependencies
Other changes: bin/compile and support for new environment variables
Closes: #34 (closed)