Skip to content

Commit 2c9a1d3

Browse files
authored
Merge pull request #1 from lets-qa/codex/create-arm-based-docker-container-with-ruby-3.2.2
Add Dockerfile for ARM-based Ruby container
2 parents 7da93d7 + 533d0d0 commit 2c9a1d3

4 files changed

Lines changed: 69 additions & 1 deletion

File tree

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM --platform=$TARGETPLATFORM ruby:3.2.2-slim
2+
3+
# Install dependencies
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
build-essential \
6+
chromium \
7+
libpq-dev \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
WORKDIR /app
11+
12+
COPY Gemfile ./
13+
COPY Gemfile.lock ./ || true
14+
15+
RUN bundle install
16+
17+
CMD ["irb"]

Gemfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
source "https://rubygems.org"
2+
3+
gem 'cucumber'
4+
gem 'rspec'
5+
gem 'headless'
6+
gem 'watir'
7+
gem 'aruba'
8+
gem 'mail'
9+
# gem 'cucumber-api'
10+
11+
gem 'pdf-reader'
12+
gem 'terminal-table'
13+
gem 'awesome_print'
14+
gem 'webdrivers'
15+
gem 'nokogiri'
16+
gem 'watir-nokogiri'
17+
gem 'watir-scroll'
18+
gem 'pg'
19+
gem 'net-ssh-gateway'
20+
gem 'aws-sdk-secretsmanager'
21+
gem 'net-sftp'
22+
# Removed unnecessary gem 'csv' as it is part of Ruby's standard library.

Gemfile.lock

Whitespace-only changes.

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
# test-runner
1+
# Test Runner Docker Container
2+
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.
6+
7+
## Building
8+
9+
Build the image using Docker's buildx so the container is built for ARM64:
10+
11+
```bash
12+
docker buildx build --platform linux/arm64 -t test-runner:arm64 .
13+
```
14+
15+
The resulting image contains all gems listed in the `Gemfile` and can be
16+
used to execute tests or scripts that depend on them.
17+
18+
## Running with Local Tests
19+
20+
To execute tests stored on your machine, map the directory containing
21+
your test suite to `/app` inside the container. For example, if your
22+
tests are located in `~/lets-qa/acceptance/`, start the container with:
23+
24+
```bash
25+
docker run -it --rm -v ~/lets-qa/acceptance:/app test-runner:arm64 bash
26+
```
27+
28+
This command launches the container with the current working directory set
29+
to `/app`, where your tests are mounted. From there you can run any
30+
commands you need, such as `bundle exec cucumber` or `bundle exec rspec`.

0 commit comments

Comments
 (0)