# syntax=docker/dockerfile:1.6

FROM mcr.microsoft.com/playwright:v1.56.0-jammy

LABEL org.opencontainers.image.source="https://codeberg.org/johba/harb-ci"
LABEL org.opencontainers.image.description="Playwright + Docker image for Harb Stack end-to-end CI"

ENV DEBIAN_FRONTEND=noninteractive \
    PNPM_HOME=/root/.local/share/pnpm \
    PATH=/root/.local/share/pnpm:/root/.local/bin:$PATH

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
    --mount=type=cache,target=/var/lib/apt,sharing=locked \
    apt-get update && \
    apt-get install -y --no-install-recommends \
      git \
      ca-certificates \
      jq \
      curl && \
    rm -rf /var/lib/apt/lists/*

RUN corepack enable && \
    corepack prepare pnpm@8.15.4 --activate && \
    corepack prepare yarn@1.22.19 --activate

WORKDIR /workspace

CMD ["bash"]
