Skip to content

Add official Docker support and containerization #65

Description

@HritikRaj2

Feature Request: Add Official Docker Support

Problem Description

The README explicitly states "Virtual environments are not currently supported" but Docker containers would greatly improve developer experience and accessibility.

Current Issues:

  • Complex multi-step installation process requiring specific OS versions (Ubuntu/CentOS/macOS only)
  • Long build times (5-10 minutes) that must be repeated on each setup
  • Dependency conflicts between multiple components
  • No easy way to test APIS without full local installation
  • Difficult to share consistent development environments across team members

Proposed Solution

Add official Docker support with the following components:

  1. Official Dockerfile - Single container with all APIS services
  2. Docker Compose - Multi-container setup for development
  3. Documentation - Docker usage guide in README
  4. CI/CD Integration - Automated Docker image building

Implementation Details

**Dockerfile Structure:**file
FROM ubuntu:20.04

Install dependencies, clone repos, build components

Expose all necessary ports (27018, 4382, 4390, 8000, 10000)

Set proper CMD to start servicesDocker Compose for Development:

version: '3.8'
services:
apis:
build: .
ports:
- "4382:4382" # Main Controller
- "4390:4390" # Hardware Emulator
- "8000:8000" # Service Center
- "10000:10000" # Testing Interface
- "27018:27018" # MongoDB
volumes:
- ./data:/app/data # Persistent MongoDB data### Benefits

  • Faster Setup: docker-compose up instead of 15+ step installation
  • Cross-Platform: Works on Windows, macOS, Linux
  • Isolated Environment: No dependency conflicts with host system
  • Team Consistency: Same environment for all developers
  • Easy Testing: Spin up/down environments for testing
  • CI/CD Ready: Docker images can be built and deployed automatically

Usage Example

Quick start

git clone https://github.com/hyphae/APIS.git
cd APIS
docker-compose up

Access interfaces at:

- Main Controller: http://localhost:4382/

- Hardware Emulator: http://localhost:4390/

- Service Center: http://localhost:8000/static/ui_example/staff/visual.html

- Testing Interface: http://localhost:10000/### Additional Considerations

  • Security: Ensure proper user permissions in container
  • Performance: Optimize image size and build caching
  • Persistence: Handle MongoDB data persistence properly
  • Development: Mount source code for live development
  • Multi-stage builds: Separate build and runtime images for smaller final images

Related Issues

  • Would resolve Windows compatibility issues
  • Improves developer onboarding experience
  • Enables easier contribution and testing

Acceptance Criteria

  • Official Dockerfile created and tested
  • Docker Compose configuration added
  • Docker usage documented in README
  • All APIS services accessible through Docker
  • CI/CD pipeline builds Docker images
  • Cross-platform testing (Windows/macOS/Linux)

Priority: High
Difficulty: Medium
Estimated Time: 2-3 weeks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions