Docker Deployment
Note: No Dockerfile currently exists in the repository. This guide describes the planned Docker configuration. Container support is on the roadmap.
This guide describes the Docker configuration for building and running FinFocus in a containerized environment.
Quick Start
Section titled “Quick Start”Pull from GitHub Container Registry
Section titled “Pull from GitHub Container Registry”# Pull the latest releasedocker pull ghcr.io/rshade/finfocus:latest
# Pull a specific versiondocker pull ghcr.io/rshade/finfocus:v0.3.0Build Locally
Section titled “Build Locally”Note: Local builds require a Dockerfile, which is not yet in the repository. The following commands are provided for reference and will work once Docker support is added. See the roadmap for status.
# Build the image (planned - requires Dockerfile)docker build -f docker/Dockerfile -t finfocus:local .
# Run the help commanddocker run --rm finfocus:local --helpUsage Examples
Section titled “Usage Examples”Basic Commands
Section titled “Basic Commands”# Show helpdocker run --rm ghcr.io/rshade/finfocus:latest --help
# List pluginsdocker run --rm ghcr.io/rshade/finfocus:latest plugin list
# Validate pluginsdocker run --rm ghcr.io/rshade/finfocus:latest plugin validateCost Analysis with Volume Mounts
Section titled “Cost Analysis with Volume Mounts”# Calculate projected costs from a local Pulumi plandocker run --rm \ -v $(pwd):/workspace \ ghcr.io/rshade/finfocus:latest \ cost projected --pulumi-json /workspace/plan.json
# Get actual costs with configurationdocker run --rm \ -v $(pwd):/workspace \ -v ~/.finfocus:/home/finfocus/.finfocus \ ghcr.io/rshade/finfocus:latest \ cost actual --from 2024-01-01 --to 2024-01-31Plugin Management
Section titled “Plugin Management”# Mount plugin directory to persist pluginsdocker run --rm \ -v ~/.finfocus/plugins:/home/finfocus/.finfocus/plugins \ ghcr.io/rshade/finfocus:latest \ plugin listImage Details
Section titled “Image Details”- Base Image: Alpine Linux (latest)
- Go Version: 1.25.8 (golang:1.25.8-alpine)
- User: Non-root user
finfocus(UID: 1001, GID: 1001) - Working Directory:
/home/finfocus - Plugin Directory:
/home/finfocus/.finfocus/plugins - Specs Directory:
/home/finfocus/.finfocus/specs
Security Features
Section titled “Security Features”- Runs as non-root user for enhanced security
- Multi-stage build to minimize image size
- Health check included for container monitoring
- SBOM (Software Bill of Materials) generated during CI builds
- Vulnerability scanning with Trivy
Environment Variables
Section titled “Environment Variables”The container respects the following environment variables:
HOME: Set to/home/finfocusPATH: Includes/usr/local/binfor the finfocus binary
Persistent Data
Section titled “Persistent Data”To persist plugins and configuration between container runs:
# Create local directoriesmkdir -p ~/.finfocus/{plugins,specs}
# Run with persistent volumesdocker run --rm \ -v ~/.finfocus:/home/finfocus/.finfocus \ -v $(pwd):/workspace \ ghcr.io/rshade/finfocus:latest \ cost projected --pulumi-json /workspace/plan.jsonDevelopment
Section titled “Development”Build Arguments
Section titled “Build Arguments”The Dockerfile supports the following build-time variables:
- Git version information is automatically embedded during build
- Build date and commit information included in the binary
Health Check
Section titled “Health Check”The image includes a health check that runs finfocus --help:
{% raw %}
# Check container healthdocker inspect --format='{{.State.Health.Status}}' <container_id>{% endraw %}
Troubleshooting
Section titled “Troubleshooting”Permission Issues
Section titled “Permission Issues”If you encounter permission issues with volume mounts:
# Ensure proper ownership of plugin directoriessudo chown -R 1001:1001 ~/.finfocusPlugin Installation
Section titled “Plugin Installation”Currently, plugins must be manually installed in the ~/.finfocus/plugins
directory. Future versions will include automated plugin downloading capabilities.