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 npm install -g @bitwarden/cli@2025.6.0

# 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"]
