11# Test Runner Docker Container
22
3- This repository provides a Dockerfile for building an ARM-based container
4- with Ruby 3.2.2 and several testing gems. The container also installs
5- Chromium so it can be used for headless browsing.
3+ This repository provides a Dockerfile for building a container with Ruby
4+ 3.2.2 and several testing gems. The container also installs Chromium so it
5+ can be used for headless browsing. The Dockerfile works with multiple
6+ architectures, allowing you to build either ARM64 or AMD64 images.
67
78## Building
89
9- Build the image using Docker's buildx so the container is built for ARM64:
10+ Build the image using Docker's buildx. To build for ARM64 run :
1011
1112``` bash
1213docker buildx build --platform linux/arm64 -t test-runner:arm64 .
1314```
1415
16+ To build for AMD64 simply change the platform and tag:
17+
18+ ``` bash
19+ docker buildx build --platform linux/amd64 -t test-runner:amd64 .
20+ ```
21+
1522The resulting image contains all gems listed in the ` Gemfile ` and can be
1623used to execute tests or scripts that depend on them.
1724
@@ -21,8 +28,13 @@ To execute tests stored on your machine, map the directory containing
2128your test suite to ` /app ` inside the container. For example, if your
2229tests are located in ` ~/lets-qa/acceptance/ ` , start the container with:
2330
31+
2432``` bash
33+ # For an ARM64 image
2534docker run -it --rm -v ~ /lets-qa/acceptance:/app test-runner:arm64 bash
35+
36+ # For an AMD64 image
37+ docker run -it --rm -v ~ /lets-qa/acceptance:/app test-runner:amd64 bash
2638```
2739
2840This command launches the container with the current working directory set
0 commit comments