Skip to content

Create Ironic Container file #4

@abhibongale

Description

@abhibongale

Create an optimized Dockerfile that builds Ironic from local source code. This will be the foundation for fast rebuilds - it needs to be structured for maximum Docker layer caching efficiency.

The Dockerfile should support building Ironic from a local directory (e.g., ~/code/ironic) so developers can test their changes.

Goals

  • Create multi-stage Dockerfile for Ironic
  • Optimize for Docker layer caching
  • Build from local source directory
  • Include all Ironic dependencies
  • Support both API and Conductor services

Tasks

  • Create stackbox/templates/ironic/Dockerfile
  • Stage 1: Base OS and system packages
  • Stage 2: Python dependencies (cached layer)
  • Stage 3: Ironic source code
  • Install required system packages (libvirt, etc.)
  • Install Python dependencies from requirements.txt
  • Copy and install Ironic from local source
  • Configure proper entry points
  • Add health check support
  • Test full build (measure time)
  • Test incremental rebuild (measure time)
  • Document build process

Acceptance Criteria

  • Dockerfile builds successfully
  • Can build from local Ironic source
  • Full build completes in < 5 minutes
  • Incremental rebuild (code only) < 2 minutes
  • Image size is reasonable (< 2GB)
  • Both ironic-api and ironic-conductor can run from same image
  • Health checks work

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions