FROM debian:12
ENV DEBIAN_FRONTEND=noninteractive
ENV CI=true
RUN apt-get update -qq && \
apt-get install -y \
curl \
ca-certificates \
gnupg \
sudo \
xvfb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
apt-get update -qq && \
apt-get install -y google-chrome-stable && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs
RUN npm install -g pnpm
RUN which xvfb-run
RUN useradd -m -s /bin/bash testuser && \
echo 'testuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /app
USER testuser
CMD ["bash"]