Skip to content

Add integrator-dist Dockerfiles for alpine, ubuntu, and rocky#411

Open
chiranSachintha wants to merge 7 commits into
wso2:masterfrom
chiranSachintha:integrator-dist
Open

Add integrator-dist Dockerfiles for alpine, ubuntu, and rocky#411
chiranSachintha wants to merge 7 commits into
wso2:masterfrom
chiranSachintha:integrator-dist

Conversation

@chiranSachintha
Copy link
Copy Markdown

@chiranSachintha chiranSachintha commented Apr 6, 2026

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Three new Dockerfile+README sets are added (Alpine, Rocky, Ubuntu) to build WSO2 Integrator images. Each Dockerfile installs OS packages and locales, downloads and verifies an architecture-specific Temurin JDK, creates a configurable non-root user, downloads and unpacks an Integrator distribution ZIP into the user home, configures BALLERINA_HOME and PATH, switches to the non-root user, sets WORKDIR, and defaults to running bal version.

Sequence Diagram(s)

sequenceDiagram
  participant DockerBuild
  participant PackageManager
  participant TemurinHost
  participant FileSystem
  participant ContainerRuntime

  DockerBuild->>PackageManager: update OS & install packages (dnf/apt/apk)
  DockerBuild->>TemurinHost: download arch-specific Temurin JDK tarball (URL)
  TemurinHost-->>DockerBuild: tarball
  DockerBuild->>DockerBuild: verify SHA-256 checksum
  DockerBuild->>FileSystem: extract JDK to /opt/java/openjdk (set JAVA_HOME, PATH)
  DockerBuild->>FileSystem: create non-root user/group
  DockerBuild->>TemurinHost: download Integrator distribution ZIP (WSO2_SERVER_DIST_URL)
  TemurinHost-->>DockerBuild: integrator ZIP
  DockerBuild->>FileSystem: unzip integrator into user home, remove ZIP, chown
  DockerBuild->>ContainerRuntime: set BALLERINA_HOME, update PATH, switch user, WORKDIR, CMD bal version
Loading

Suggested reviewers

  • anuruddhal
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description consists entirely of the template structure with placeholder text and no actual content filled in for any section. Fill in the required template sections with relevant details: Purpose (with issue links), Goals, Approach, Release note, and complete the Security checks section confirming no secrets were committed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding three new Dockerfiles for integrator-dist across alpine, ubuntu, and rocky distributions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
dockerfiles/rocky/integrator-dist/Dockerfile (1)

14-31: Missing s390x architecture support compared to Ubuntu Dockerfile.

Ubuntu Dockerfile supports s390x|s390:64-bit architecture but Rocky does not. If s390x support is needed for Rocky, add the corresponding case. If intentionally omitted (e.g., Rocky doesn't support s390x), consider adding a comment explaining the difference.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dockerfiles/rocky/integrator-dist/Dockerfile` around lines 14 - 31, The Rocky
Dockerfile's architecture case for ${ARCH} is missing the s390x entry present in
the Ubuntu Dockerfile; add a case branch for s390x (e.g., pattern like
s390x|s390:64-bit) that sets ESUM and BINARY_URL to the same values used in the
Ubuntu Dockerfile's s390x case (so the OpenJDK tarball and checksum match), or
if s390x support is intentionally not provided for Rocky, add a clear comment
above the case block explaining why s390x was omitted; update the case handling
around the existing ESUM and BINARY_URL assignments accordingly.
dockerfiles/rocky/integrator-dist/README.md (1)

1-1: Consider expanding documentation.

The single-line README is acceptable for an initial addition, but consider adding build instructions, required build arguments (e.g., WSO2_SERVER_DIST_URL), and usage examples in a follow-up.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dockerfiles/rocky/integrator-dist/README.md` at line 1, The README currently
contains only a title; expand it to include concise build and usage
documentation: add a "Build" section detailing required build arguments (at
minimum document WSO2_SERVER_DIST_URL and any other Docker build-arg names used
in the Dockerfile), example docker build command with the build-args, a
"Run/Usage" section showing example docker run commands and exposed ports, and a
"Notes" or "Troubleshooting" section for common pitfalls; reference the README's
title line so the maintainer knows to update that file and ensure the documented
build-arg names exactly match the ARG names used in the Dockerfile(s).
dockerfiles/alpine/integrator-dist/Dockerfile (1)

53-53: Placeholder URL will cause build failure if not overridden.

The default value <INTEGRATOR_DIST_URL> will cause wget to fail with a confusing error if the build argument isn't provided. Consider adding validation or documenting the required build argument prominently.

💡 Optional: Add validation before download
+RUN if [ "${WSO2_SERVER_DIST_URL}" = "<INTEGRATOR_DIST_URL>" ]; then \
+      echo "Error: WSO2_SERVER_DIST_URL build argument must be provided"; \
+      exit 1; \
+    fi
+
 RUN wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dockerfiles/alpine/integrator-dist/Dockerfile` at line 53, The Dockerfile
currently sets ARG WSO2_SERVER_DIST_URL=<INTEGRATOR_DIST_URL>, which will cause
wget to fail if the build arg is not provided; update the Dockerfile to avoid a
confusing failure by removing the placeholder default or setting it empty and
add an early validation step that checks WSO2_SERVER_DIST_URL before attempting
the download (e.g., a RUN that tests if the variable is non-empty and prints a
clear error and exits if not), and ensure the wget/download step references the
same ARG/ENV (WSO2_SERVER_DIST_URL) so the build fails fast with a clear message
when the build-arg is missing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Line 1: The Dockerfile's base image tag "FROM rockylinux:9.5" is invalid and
causes builds to fail; update that FROM line to use a valid tag such as
"rockylinux:9.3" or the generic "rockylinux:9" so the image exists on Docker
Hub, i.e., replace the "FROM rockylinux:9.5" entry in the Dockerfile with one of
those valid tags.
- Around line 12-13: The Dockerfile's ARCH detection relies on objdump (see
ARCH="$(objdump="$(command -v objdump)" ...")") but binutils may not be
installed, causing a "command not found" failure; update the Dockerfile to
either install binutils (so objdump exists) in the package install step or
replace the objdump-based detection with a portable command like uname -m to set
ARCH, and ensure the change references the ARCH variable and the objdump
invocation so you modify the correct logic.

---

Nitpick comments:
In `@dockerfiles/alpine/integrator-dist/Dockerfile`:
- Line 53: The Dockerfile currently sets ARG
WSO2_SERVER_DIST_URL=<INTEGRATOR_DIST_URL>, which will cause wget to fail if the
build arg is not provided; update the Dockerfile to avoid a confusing failure by
removing the placeholder default or setting it empty and add an early validation
step that checks WSO2_SERVER_DIST_URL before attempting the download (e.g., a
RUN that tests if the variable is non-empty and prints a clear error and exits
if not), and ensure the wget/download step references the same ARG/ENV
(WSO2_SERVER_DIST_URL) so the build fails fast with a clear message when the
build-arg is missing.

In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 14-31: The Rocky Dockerfile's architecture case for ${ARCH} is
missing the s390x entry present in the Ubuntu Dockerfile; add a case branch for
s390x (e.g., pattern like s390x|s390:64-bit) that sets ESUM and BINARY_URL to
the same values used in the Ubuntu Dockerfile's s390x case (so the OpenJDK
tarball and checksum match), or if s390x support is intentionally not provided
for Rocky, add a clear comment above the case block explaining why s390x was
omitted; update the case handling around the existing ESUM and BINARY_URL
assignments accordingly.

In `@dockerfiles/rocky/integrator-dist/README.md`:
- Line 1: The README currently contains only a title; expand it to include
concise build and usage documentation: add a "Build" section detailing required
build arguments (at minimum document WSO2_SERVER_DIST_URL and any other Docker
build-arg names used in the Dockerfile), example docker build command with the
build-args, a "Run/Usage" section showing example docker run commands and
exposed ports, and a "Notes" or "Troubleshooting" section for common pitfalls;
reference the README's title line so the maintainer knows to update that file
and ensure the documented build-arg names exactly match the ARG names used in
the Dockerfile(s).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 49a37aac-701b-441a-b8e2-5416db237ceb

📥 Commits

Reviewing files that changed from the base of the PR and between 3fa18e2 and fd1b1c0.

📒 Files selected for processing (6)
  • dockerfiles/alpine/integrator-dist/Dockerfile
  • dockerfiles/alpine/integrator-dist/README.md
  • dockerfiles/rocky/integrator-dist/Dockerfile
  • dockerfiles/rocky/integrator-dist/README.md
  • dockerfiles/ubuntu/integrator-dist/Dockerfile
  • dockerfiles/ubuntu/integrator-dist/README.md

Comment thread dockerfiles/rocky/integrator-dist/Dockerfile Outdated
Comment thread dockerfiles/rocky/integrator-dist/Dockerfile
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 3-7: The Dockerfile currently only sets ENV vars and installs
glibc-langpack-en; update the locale setup to mirror the micro-integrator
pattern by installing glibc-locale-source, invoking localedef for en_US.UTF-8,
and writing locale configuration files (/etc/locale.conf and
/etc/environment)—modify the RUN block that installs packages (the dnf install
line) to include glibc-locale-source, add a localedef step for en_US.UTF-8, and
create the two files with the correct LANG/LC_ALL settings so the ENV entries
and installed locale are consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b9ce4a02-5db7-40fe-9349-eb8680b0f3ce

📥 Commits

Reviewing files that changed from the base of the PR and between fd1b1c0 and 4240a35.

📒 Files selected for processing (1)
  • dockerfiles/rocky/integrator-dist/Dockerfile

Comment thread dockerfiles/rocky/integrator-dist/Dockerfile
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 5-8: The RUN step installing glibc-locale-source/glibc-langpack-en
should remove DNF caches to avoid bloating the image: after the dnf install &&
locale setup commands in the same RUN (the block that calls dnf install and
localedef and writes /etc/locale.conf and /etc/environment) append a DNF cleanup
command (e.g., dnf clean all && rm -rf /var/cache/dnf) so package metadata and
caches are deleted in the same layer.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 425c722f-f4b2-46fa-ae4e-32315960a00a

📥 Commits

Reviewing files that changed from the base of the PR and between 4240a35 and 0cc8a6a.

📒 Files selected for processing (1)
  • dockerfiles/rocky/integrator-dist/Dockerfile

Comment thread dockerfiles/rocky/integrator-dist/Dockerfile Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
dockerfiles/rocky/integrator-dist/Dockerfile (1)

70-70: ⚡ Quick win

Hardcoded Ballerina version may break if distribution changes.

The path ballerina-2201.13.2 is hardcoded in BALLERINA_HOME. If the Integrator distribution is updated with a different Ballerina version, the container will fail at runtime. Consider making this an ARG so it can be updated alongside WSO2_SERVER_VERSION.

♻️ Proposed fix
+ARG BALLERINA_VERSION=2201.13.2
 ARG WSO2_SERVER_DIST_URL=<INTEGRATOR_DIST_URL>

 RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \
     && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER}

 RUN wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \
     && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \
     && rm -f ${WSO2_SERVER}.zip \
     && chown -R ${USER}:${USER_GROUP} ${USER_HOME}

-ENV BALLERINA_HOME=${WSO2_SERVER_HOME}/ballerina-2201.13.2
+ENV BALLERINA_HOME=${WSO2_SERVER_HOME}/ballerina-${BALLERINA_VERSION}
 ENV PATH="${BALLERINA_HOME}/bin:${PATH}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@dockerfiles/rocky/integrator-dist/Dockerfile` at line 70, The Dockerfile
hardcodes BALLERINA_HOME to ballerina-2201.13.2; introduce a build ARG (e.g.,
BALLERINA_VERSION) with a sensible default and use it to set ENV BALLERINA_HOME
so the value becomes ${WSO2_SERVER_HOME}/ballerina-${BALLERINA_VERSION}; update
any references or documentation that assume the hardcoded name and ensure the
ARG is declared near WSO2_SERVER_VERSION so the Ballerina version can be
overridden at build time.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Line 70: The Dockerfile hardcodes BALLERINA_HOME to ballerina-2201.13.2;
introduce a build ARG (e.g., BALLERINA_VERSION) with a sensible default and use
it to set ENV BALLERINA_HOME so the value becomes
${WSO2_SERVER_HOME}/ballerina-${BALLERINA_VERSION}; update any references or
documentation that assume the hardcoded name and ensure the ARG is declared near
WSO2_SERVER_VERSION so the Ballerina version can be overridden at build time.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9fc7d4ea-f949-41c6-a59f-bee8739e8597

📥 Commits

Reviewing files that changed from the base of the PR and between 0cc8a6a and c8ea9f5.

📒 Files selected for processing (1)
  • dockerfiles/rocky/integrator-dist/Dockerfile

Comment thread dockerfiles/alpine/integrator-dist/Dockerfile Outdated
@chiranSachintha chiranSachintha requested a review from keizer619 May 25, 2026 09:40
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dockerfiles/alpine/integrator-dist/Dockerfile`:
- Around line 9-11: The comment about the JDK version is inconsistent with the
environment variable; update the plaintext comment that currently says “OpenJDK
21” to reference OpenJDK 25 so it matches ENV JAVA_VERSION jdk-25.0.2+10 (look
for the ENV JAVA_VERSION line and the adjacent install comment in the Dockerfile
and change the comment text only).

In `@dockerfiles/rocky/integrator-dist/Dockerfile`:
- Around line 16-18: The comment on the Dockerfile is out of sync with the
declared JAVA_VERSION: update the comment that currently reads "install Temurin
OpenJDK 21" to reference JDK 25 (e.g., "install Temurin OpenJDK 25") so it
matches the ENV JAVA_VERSION jdk-25.0.2+10; ensure any adjacent comments
mentioning OpenJDK version are also aligned.

In `@dockerfiles/ubuntu/integrator-dist/Dockerfile`:
- Around line 11-13: The comment "install Temurin OpenJDK 21" is out of sync
with the ENV setting; update the comment to match the ENV JAVA_VERSION value
(ENV JAVA_VERSION jdk-25.0.2+10) so the Dockerfile accurately documents which
JDK is being installed; locate the comment near the ENV JAVA_VERSION declaration
and change the "OpenJDK 21" text to reference jdk-25.0.2+10 (or a matching
human-readable version) to keep them consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da70c204-844a-4f7c-8026-44eaf29ebca8

📥 Commits

Reviewing files that changed from the base of the PR and between c8ea9f5 and 991190a.

📒 Files selected for processing (3)
  • dockerfiles/alpine/integrator-dist/Dockerfile
  • dockerfiles/rocky/integrator-dist/Dockerfile
  • dockerfiles/ubuntu/integrator-dist/Dockerfile

Comment thread dockerfiles/alpine/integrator-dist/Dockerfile Outdated
Comment thread dockerfiles/rocky/integrator-dist/Dockerfile Outdated
Comment thread dockerfiles/ubuntu/integrator-dist/Dockerfile Outdated
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.

2 participants