Skip to content

feat: add containerized build/test environment via Dockerfile - #1493

Merged
alexeyqu merged 3 commits into
masterfrom
feat/jdk-free-build-dockerfile
Jun 30, 2026
Merged

feat: add containerized build/test environment via Dockerfile#1493
alexeyqu merged 3 commits into
masterfrom
feat/jdk-free-build-dockerfile

Conversation

@alexeyqu

@alexeyqu alexeyqu commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Adds a Dockerfile pinned to gradle:8.10.2-jdk11 and a docker-compose.yml so contributors can run the full test suite with no local JDK installed:

docker compose run --rm test

The compose file encodes the source bind-mount and a named volume for the Gradle dependency cache, so the first run resolves dependencies and subsequent runs reuse them.

Notable decisions / tradeoffs

  • Bind-mount design: source is bind-mounted at run time rather than COPYed into the image, so the image doesn't need rebuilding on every code change. The docker-compose.yml hides this from contributors -- they just run docker compose run.
  • .gitignore cleanup: removed the bare Dockerfile rule. The rule's comment said it was for the demo-server's generated Dockerfile, but that file lands in distributions/demo-server/build/demo/Dockerfile -- already covered by the build/ ignore rule. The bare rule was redundant.
  • Image name datatransferproject/dev: mirrors the existing datatransferproject/demo image produced by the :dockerize task, establishing a consistent namespace.
  • JDK pinned to 11: the Gradle wrapper (6.9.2) can't parse Java 17 bytecode when compiling build scripts -- gradle:*-jdk17 fails outright. Not a preference; a hard constraint from the wrapper version.

@alexeyqu

Copy link
Copy Markdown
Collaborator Author

Looks like the Java CI failure is preexisting -- I reran the latest master branch and it failed despite passing last month -- investigating...

@alexeyqu

Copy link
Copy Markdown
Collaborator Author

Confirmed, looks like a flaky test -- see https://github.com/dtinit/data-transfer-project/actions/runs/26077383377 run history

@lisad lisad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additional documentation is appreciated!

@alexeyqu
alexeyqu merged commit 5b9cab9 into master Jun 30, 2026
6 checks passed
@alexeyqu
alexeyqu deleted the feat/jdk-free-build-dockerfile branch June 30, 2026 15:31
alexeyqu added a commit that referenced this pull request Jul 6, 2026
Runs the test suite via the Dockerfile/docker-compose added in #1493, on
the same push/PR triggers as the existing Gradle workflow, so the two
can be compared side by side before the containerized path becomes the
default.
@alexeyqu

alexeyqu commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

cc @simonxander -- I am curious if this direction would simplify your work / Developer Experience / deployment setup. Let me know if you'd be up for a discussion here (probably via a call).

@simonxander

Copy link
Copy Markdown
Collaborator

cc @simonxander -- I am curious if this direction would simplify your work / Developer Experience / deployment setup. Let me know if you'd be up for a discussion here (probably via a call).

Hi @alexeyqu, thanks for the ping!

I have tested the docker compose setup, and it works perfectly. This is very helpful for me, especially when switching between different projects that need different Java environments. It also makes setting up the environment much faster for new people joining the project.

For further discussion, I prefer text-based communication. Please feel free to share your thoughts right here in the comments!

@alexeyqu

Copy link
Copy Markdown
Collaborator Author

Thank you @simonxander -- I am continuing to improve the DevEx setup here, would greatly appreciate any ideas. Currently the next proposed step is some docker image tightening in #1505.

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.

3 participants