Skip to content

Commit 5f7db06

Browse files
authored
Merge pull request #2 from lets-qa/codex/fix-docker-build-copy-command-issue
Fix Docker COPY command
2 parents 2c9a1d3 + ecd3537 commit 5f7db06

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1010
WORKDIR /app
1111

1212
COPY Gemfile ./
13-
COPY Gemfile.lock ./ || true
13+
COPY Gemfile.lock ./
1414

1515
RUN bundle install
1616

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
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
1213
docker 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+
1522
The resulting image contains all gems listed in the `Gemfile` and can be
1623
used 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
2128
your test suite to `/app` inside the container. For example, if your
2229
tests are located in `~/lets-qa/acceptance/`, start the container with:
2330

31+
2432
```bash
33+
# For an ARM64 image
2534
docker 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

2840
This command launches the container with the current working directory set

0 commit comments

Comments
 (0)