Skip to content

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

Open
chiranSachintha wants to merge 1 commit intowso2:masterfrom
chiranSachintha:integrator-dist
Open

Add integrator-dist Dockerfiles for alpine, ubuntu, and rocky#411
chiranSachintha wants to merge 1 commit intowso2: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.

Summary by CodeRabbit

  • New Features
    • Added Docker container images for WSO2 Integrator distribution optimized for Alpine, Rocky Linux, and Ubuntu base operating systems.
    • Each image includes pre-configured Java runtime and Ballerina support for immediate deployment.
    • Added documentation for each container variant.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Walkthrough

Three new Dockerfile and README pairs are added for WSO2 Integrator distribution across Alpine, Rocky, and Ubuntu base images. Each Dockerfile performs OS setup, downloads and verifies Temurin OpenJDK 21, extracts the Integrator distribution, configures Ballerina, and establishes a non-root user runtime environment.

Changes

Cohort / File(s) Summary
Alpine Integrator Distribution
dockerfiles/alpine/integrator-dist/Dockerfile, dockerfiles/alpine/integrator-dist/README.md
Adds Alpine-based Docker image with OS dependencies, Temurin JDK 21 installation via SHA-256 verification, Integrator distribution extraction, Ballerina configuration, and non-root user setup.
Rocky Integrator Distribution
dockerfiles/rocky/integrator-dist/Dockerfile, dockerfiles/rocky/integrator-dist/README.md
Adds Rocky Linux 9.5-based Docker image with locale configuration, JDK 21 installation with checksum validation, Integrator distribution deployment, and Ballerina environment configuration.
Ubuntu Integrator Distribution
dockerfiles/ubuntu/integrator-dist/Dockerfile, dockerfiles/ubuntu/integrator-dist/README.md
Adds Ubuntu 25.10-based Docker image with UTF-8 locale setup, Temurin JDK 21 installation, Integrator distribution extraction, and Ballerina path configuration for container execution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Three Alpine paths, Rocky peaks, Ubuntu plains so wide,
Dockerfiles bundled with care, Ballerina as our guide,
Non-root users dancing free, Java verified with grace,
WSO2 Integrator finds its place in every base!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only the template structure with placeholder prompts and no actual content filled in for any required sections. Fill in all required template sections with actual details: Purpose, Goals, Approach, User stories, Release note, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Related PRs, and Test environment.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding Dockerfiles for integrator-dist across three distributions (alpine, ubuntu, rocky).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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

@@ -0,0 +1,69 @@
FROM rockylinux:9.5
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check available Rocky Linux tags on Docker Hub
curl -s "https://hub.docker.com/v2/repositories/library/rockylinux/tags?page_size=20" | jq -r '.results[].name' | head -20

Repository: wso2/docker-ei

Length of output: 281


Update base image to an available Rocky Linux version; rockylinux:9.5 does not exist.

The Dockerfile references rockylinux:9.5, but this tag is not available on Docker Hub. The highest patch version available for Rocky 9 is 9.3. Update to either rockylinux:9.3 or the generic rockylinux:9 tag. This will cause the build to fail immediately.

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

In `@dockerfiles/rocky/integrator-dist/Dockerfile` at 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.

Comment on lines +12 to +13
RUN set -eux; \
ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Architecture detection depends on objdump which may not be installed.

The objdump command requires binutils which is not installed in line 6. This will cause the build to fail with "command not found".

🐛 Proposed fix: Add binutils to installed packages
 RUN dnf update -y \
-    && dnf install -y ca-certificates curl glibc-langpack-en unzip wget \
+    && dnf install -y binutils ca-certificates curl glibc-langpack-en unzip wget \
     && dnf clean all

Alternatively, consider using uname -m for architecture detection, which is more portable:

 RUN set -eux; \
-    ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \
+    ARCH="$(uname -m)"; \
     case "${ARCH}" in \
-       aarch64|arm64) \
+       aarch64) \
🤖 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 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.

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.

1 participant