Skip to content

update Dockerfile test fixture for ARM64 - #12141

Open
codefish1 wants to merge 1 commit into
testcontainers:mainfrom
codefish1:test/arm64-dockerfile-container
Open

codefish1 wants to merge 1 commit into
testcontainers:mainfrom
codefish1:test/arm64-dockerfile-container

Conversation

@codefish1

@codefish1 codefish1 commented Oct 26, 2026 •

Copy link
Copy Markdown

Fixes #12137.

Problem

DockerfileContainerTest.simpleDslTest uses alpine:3.2, which has no linux/arm64 manifest. On an ARM64 Docker host the test fails while resolving its base image, before exercising the Dockerfile builder.

Change

  • Use alpine:3.12, which has an ARM64 image.
  • Create /run/nginx and change the fixture's default 404 response to HTTP 200, preserving the test's existing assertion.

This branch changes only the test fixture.

Verification

  • :testcontainers:test --tests org.testcontainers.junit.DockerfileContainerTest.simpleDslTest passes on ARM64 Docker with the fork's main baseline.
  • :testcontainers:build -x :testcontainers:test -x :testcontainers:spotlessJavaCheck passes.
  • git diff --check passes.

The full Docker integration suite has not completed locally. The Java Spotless check requires npm, which is unavailable on this host. CI should run the complete checks before merge.

Summary by CodeRabbit

  • Tests
    • Updated the Dockerfile-based container test to use a newer Alpine version and return a successful HTTP response from Nginx, improving coverage of the expected container behavior.

@codefish1
codefish1 requested a review from a team as a code owner October 26, 2026 17:07
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8d182d66-6667-497a-8c46-6bef09bdbd77
Commits

Reviewing files that changed from the base of the PR and between f74d167 and f88febc.

Files selected for processing: 1
  • core/src/test/java/org/testcontainers/junit/DockerfileContainerTest.java

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

Walkthrough

The Dockerfile test fixture now uses Alpine 3.12, creates /run/nginx, and configures Nginx to return HTTP 200.

Changes: Dockerfile test fixture

Layer / File(s) Summary
Update Dockerfile fixture
core/src/test/java/org/testcontainers/junit/DockerfileContainerTest.java
The fixture uses Alpine 3.12, creates /run/nginx, and changes the default Nginx response to HTTP 200.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: eddumelendez

Merge Risk: Minimal · up to f88fe

No actionable merge-blocking risk remains; the fixture changes are compatible with the supported ARM64 and x86 test paths.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "update Dockerfile test fixture for ARM64" matches the main change. The PR switches the DockerfileContainerTest fixture from alpine:3.2 to alpine:3.12 so the test can resolve its base image …
Description check Passed The description follows the repository template in substance. It links the issue (Fixes #12137), explains the problem (alpine:3.2 lacks a linux/arm64 manifest), and describes the change (alpine:3.12, …
Linked Issues check Passed Linked issue #12137 has one active direct target. Its coding requirements are: (1) use an Alpine tag with an ARM64 manifest, such as alpine:3.12; (2) create /run/nginx; (3) change nginx's default resp…
Out of Scope Changes check Passed The whole-PR diff against the merge base changes one file: DockerfileContainerTest.java, with three added or changed lines in the Dockerfile builder fixture. Each change maps to a requirement in #1213…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Full details: Title check

Explanation

The title "update Dockerfile test fixture for ARM64" matches the main change. The PR switches the DockerfileContainerTest fixture from alpine:3.2 to alpine:3.12 so the test can resolve its base image on ARM64 hosts. The title names the fixture and the ARM64 purpose. It is specific and does not use vague terms.

Full details: Description check

Explanation

The description follows the repository template in substance. It links the issue (Fixes #12137), explains the problem (alpine:3.2 lacks a linux/arm64 manifest), and describes the change (alpine:3.12, /run/nginx, HTTP 200). It also reports verification steps and states what was not run (full Docker integration suite, Spotless check). The template's contributor checklist items (checkstyle, spotlessApply) are not explicitly addressed, but the description covers the required content: problem, change, and verification.

Full details: Linked Issues check

Explanation

Linked issue #12137 has one active direct target. Its coding requirements are: (1) use an Alpine tag with an ARM64 manifest, such as alpine:3.12; (2) create /run/nginx; (3) change nginx's default response so the test's HTTP 200 assertion still holds. The diff to core/src/test/java/org/testcontainers/junit/DockerfileContainerTest.java meets all three. It changes .from("alpine:3.2") to .from("alpine:3.12"), adds .run("mkdir -p /run/nginx"), and adds .run("sed -i 's/return 404;/return 200;/' /etc/nginx/conf.d/default.conf"). The existing assertion is unchanged. The ARM64 pass result is author-reported. This review did not run the test or check the default.conf contents inside the apk package, so that runtime behavior is not independently verified. No non-coding task applies beyond the manual verification that the author reports.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base changes one file: DockerfileContainerTest.java, with three added or changed lines in the Dockerfile builder fixture. Each change maps to a requirement in #12137: the base image tag, the /run/nginx directory, and the nginx default response. No production code, build configuration, or unrelated test is modified. The PR description and PR objectives both state that the change is limited to the test fixture, and the diff matches that statement.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DockerfileContainerTest fixture cannot run on ARM64

2 participants