FROM mcr.microsoft.com/playwright:v1.52.0-noble

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        jq \
        unzip \
        libzbar0 \
        libzbar-dev \
    && rm -rf /var/lib/apt/lists/*

# Install Bitwarden CLI
RUN npx -y @bitwarden/cli@2026.7.0 || true

# Install Python dependencies
COPY requirements.txt /tmp/
RUN pip install --no-cache-dir -r /tmp/requirements.txt

WORKDIR /app
COPY . .

ENTRYPOINT ["python3", "/app/provision-agent.py"]
