From 7c3c0d2cd0424ff585e2cb1393c6884c81979ef5 Mon Sep 17 00:00:00 2001 From: Randall Morse Date: Sun, 20 Jul 2025 22:27:16 -0400 Subject: [PATCH] Add xvfb support --- Dockerfile | 1 + README.md | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index cb9f9a1..af53042 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM --platform=$TARGETPLATFORM ruby:3.2.2-slim RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ chromium \ + xvfb \ libpq-dev \ && rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md index 963a815..b04ba21 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,10 @@ docker run -it --rm -v ~/lets-qa/acceptance:/app test-runner:amd64 bash This command launches the container with the current working directory set to `/app`, where your tests are mounted. From there you can run any commands you need, such as `bundle exec cucumber` or `bundle exec rspec`. + +If your tests require an X server, you can prefix the test command with +`xvfb-run` to run them in a virtual framebuffer. For example: + +```bash +xvfb-run bundle exec rspec +```