Skip to content

Improve the docker file#641

Draft
Piumal1999 wants to merge 2 commits into
wso2:mainfrom
Piumal1999:docker-improve
Draft

Improve the docker file#641
Piumal1999 wants to merge 2 commits into
wso2:mainfrom
Piumal1999:docker-improve

Conversation

@Piumal1999

@Piumal1999 Piumal1999 commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

  • Chores
    • Optimized Docker build configuration to reduce container image size and improve overall build performance.
    • Switched to lightweight JRE distribution and consolidated multiple installation steps into a single operation.
    • Removed redundant verification checks and implemented npm cache cleanup to further optimize the final image.

@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 741d701b-cf24-4678-b81f-e2647e52deae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ 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.

@Piumal1999 Piumal1999 changed the title Docker improve Improve the docker file Mar 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Dockerfile (1)

23-23: Use --omit=dev instead of --only=production for npm ci.

The --only=production flag is deprecated in npm 10.x (bundled with Node.js 23). The --omit=dev flag is the canonical replacement and is documented in the official npm CLI reference at https://docs.npmjs.com/cli/v10/commands/npm-ci/.

Suggested update
-RUN npm ci --only=production --ignore-scripts && npm cache clean --force
+RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile` at line 23, Replace the deprecated npm flag in the Dockerfile RUN
command: change the npm ci invocation that currently uses "--only=production" to
use the supported "--omit=dev" flag (retain "--ignore-scripts" and the
subsequent "npm cache clean --force" behavior) so the RUN line uses npm ci
--omit=dev --ignore-scripts && npm cache clean --force.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Dockerfile`:
- Line 23: Replace the deprecated npm flag in the Dockerfile RUN command: change
the npm ci invocation that currently uses "--only=production" to use the
supported "--omit=dev" flag (retain "--ignore-scripts" and the subsequent "npm
cache clean --force" behavior) so the RUN line uses npm ci --omit=dev
--ignore-scripts && npm cache clean --force.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 24c74773-6874-49e5-86cf-e16ed0f78d76

📥 Commits

Reviewing files that changed from the base of the PR and between e9dfb6e and 7549e3d.

📒 Files selected for processing (1)
  • Dockerfile

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