FROM python:3.13-slim

RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates \
    && curl -fsSL https://get.pulumi.com | sh \
    && ln -s /root/.pulumi/bin/pulumi /usr/local/bin/pulumi \
    && mkdir -p /tmp/pulumi-state \
    && rm -rf /var/lib/apt/lists/*

# Python SDK + official VMware provider (SOAP/VIM via govmomi)
RUN pip install --no-cache-dir \
      "pulumi>=3.120,<4" \
      "pulumi-vsphere==4.17.0" \
    && pulumi plugin install resource vsphere 4.17.0

WORKDIR /suite
ENV PYTHONPATH=/suite:/suite/lib:/workspace \
    PULUMI_CONFIG_PASSPHRASE=lab \
    PULUMI_BACKEND_URL=file:///tmp/pulumi-state \
    VSPHERE_SERVER=api-gateway \
    VSPHERE_ALLOW_UNVERIFIED_SSL=true

CMD ["python3", "/suite/run_suite.py"]
