# Containerised Synapse-iDOCK agent. Run one per Docker host.
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1
WORKDIR /agent

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY idock_agent.py .

# Persist the generated agent id across restarts by mounting a volume at /state.
ENV IDOCK_AGENT_ID_FILE=/state/agent_id
VOLUME ["/state"]

ENTRYPOINT ["python", "idock_agent.py"]
