Skip to content

draft: Feat add local build script#148

Draft
jessegoodier wants to merge 11 commits into
developfrom
feat-add-local-build-script
Draft

draft: Feat add local build script#148
jessegoodier wants to merge 11 commits into
developfrom
feat-add-local-build-script

Conversation

@jessegoodier

Copy link
Copy Markdown
Contributor

No description provided.

mittal-ishaan and others added 11 commits January 30, 2026 03:51
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
Signed-off-by: Bob <bob@example.com>
Changed default log export directory from /var/logs/finops-agent to
/opt/finops-agent/logs to fix read-only filesystem error.

Issue:
- /var/logs is read-only in container environments
- Log exporter was failing to initialize with error:
  'failed to create log directory /var/logs: read-only file system'
- This caused log export to be disabled on startup

Solution:
- Changed default path to /opt/finops-agent/logs
- This directory is writable in the container
- Maintains standard /opt location for application data
- Can still be overridden via LOG_EXPORT_DIR_PATH env var

The path can be customized by setting the LOG_EXPORT_DIR_PATH
environment variable if a different location is needed.

Signed-off-by: Bob <bob@example.com>
Added comprehensive tooling for building multi-architecture Docker images
supporting linux/amd64 and linux/arm64 platforms.

New Files:
1. build-multiarch.sh - Automated build script with Docker Buildx
   - Supports both local builds and registry pushes
   - Configurable via CLI flags or environment variables
   - Automatic buildx builder management
   - Color-coded output for better UX
   - Comprehensive error handling

2. BUILD.md - Complete build documentation
   - Multi-arch build instructions
   - Usage examples for various scenarios
   - Troubleshooting guide
   - CI/CD integration notes
   - Image verification instructions

3. Makefile additions
   - 'make build-multiarch' - Build locally
   - 'make build-multiarch-push' - Build and push
   - 'make help' - Display all available targets

Features:
- Builds for linux/amd64 and linux/arm64
- Compatible with existing Dockerfile
- Integrates with existing GitHub Actions workflows
- Supports custom versions, tags, and registries
- Automatic git commit detection
- Creates and manages buildx builder

Usage Examples:
  # Simple local build
  make build-multiarch

  # Build and push to registry
  VERSION=v1.0.0 REGISTRY=gcr.io/my-project make build-multiarch-push

  # Using script directly
  ./build-multiarch.sh --version v1.0.0 --registry gcr.io/my-project --push

Note: GitHub Actions already builds multi-arch images on PRs.
This script enables local multi-arch builds for development and testing.

Signed-off-by: Bob <bob@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants