Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: optimize dockerfile #1281

Closed

Conversation

thebedigupta
Copy link
Contributor

@thebedigupta thebedigupta commented Oct 4, 2024

Description
In this PR I worked on this issues

Attaching updated test results file after the changes which I made test-results.txt

  1. Remove cache after installing packages or store it in a cache mount
  2. Merge this RUN instruction with the consecutive ones
  3. Surround this variable with double quotes; otherwise, it can lead to unexpected behavior
  4. Include the ARG instruction in the build stage where it is used

Results

  • avoids caching the index, which reduces the image size.
  • decrease the no of layering in the docker image.

I solved this issue after reading sonarcloud suggestion and how it work

Related issue(s)

Copy link

changeset-bot bot commented Oct 4, 2024

⚠️ No Changeset found

Latest commit: acecefc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@thebedigupta thebedigupta changed the title Dockerfile optimization refactor : dockerfile optimization Oct 4, 2024
@thebedigupta thebedigupta changed the title refactor : dockerfile optimization perf: optimize dockerfile Oct 4, 2024
thebedigupta and others added 8 commits October 4, 2024 15:43
By mistake I committed this file
try to fix the maintainability issue
1. Ensuring that the ARG is defined in the correct scope.
2. Protecting against potential issues with variable expansion.
made changes which was suggested in the sonarcloud
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

please remove cli.js changes

Copy link

sonarqubecloud bot commented Oct 9, 2024

@thebedigupta
Copy link
Contributor Author

please remove cli.js changes

done

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

cli.js is still showing up in the list of modified files

@DhairyaMajmudar
Copy link
Contributor

Pls. have a look on the comment #1283 (comment) to fix this

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